diff --git a/Makefile b/Makefile index 8eaf8d1..9b7a243 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,11 @@ dev: pip install --upgrade --upgrade-strategy eager -r requirements.txt pip install -e . +example: + pip install --upgrade pip + pip install -r example-requirements.txt + jupyter labextension install jupyterlab-plotly + # docs: # $(MAKE) -C docs html diff --git a/example-requirements.txt b/example-requirements.txt index 0b1a424..f125800 100644 --- a/example-requirements.txt +++ b/example-requirements.txt @@ -1,5 +1,8 @@ metaflow +scikit-learn plotly-express kaleido pandas numpy +scipy +jupyterlab diff --git a/examples/model-tournament/common.py b/examples/model-tournament/common.py index faf575f..c470ec3 100644 --- a/examples/model-tournament/common.py +++ b/examples/model-tournament/common.py @@ -1,22 +1,27 @@ +import os, errno from importlib import import_module import subprocess import time +import re +from pathlib import Path +import pickle import pandas as pd from sklearn.datasets import make_regression from sklearn.pipeline import Pipeline from sklearn.preprocessing import OneHotEncoder from sklearn.compose import ColumnTransformer -from tensorflow.python.keras import Sequential -from tensorflow.python.keras.layers import Dense, Dropout +import plotly.graph_objects as go +import plotly from metaflow_helper.constants import RunMode -def import_object_from_string(path): - path, obj_str = path.rsplit('.', 1) - module_ = import_module(path) - obj = getattr(module_, obj_str) - return obj +def silent_rm_file(filename): + try: + os.remove(filename) + except OSError as e: # this would be "except OSError, e:" before Python 2.6 + if e.errno != errno.ENOENT: # errno.ENOENT = no such file or directory + raise # re-raise exception if a different error occurred def system_command_with_retry(cmd: list): @@ -86,7 +91,15 @@ def build_model_pipeline(model, step_name='model'): def parse_contender_model_init(contender): - return {k: v for k, v in contender.items() if not k.startswith('__')} + return parse_contender(contender, prefix_filter='__init_kwargs__model__', prefix_to_remove='__init_kwargs__model__') + + +def parse_contender_model_fit(contender): + return parse_contender(contender, prefix_filter='__fit_kwargs__model__', prefix_to_remove='__fit_kwargs__') + + +def parse_contender(contender, prefix_filter, prefix_to_remove): + return {re.sub(r'^' + re.escape(prefix_to_remove), '', k): v for k, v in contender.items() if k.startswith(prefix_filter)} def update_contender(contender, mode: RunMode, input_dim=None, best_iterations=None): @@ -94,14 +107,42 @@ def update_contender(contender, mode: RunMode, input_dim=None, best_iterations=N pass elif mode is RunMode.TRAIN: contender.update({ - 'iterations': best_iterations, + '__init_kwargs__model__iterations': best_iterations, }) contender.update({ - 'input_dim': input_dim, - 'mode': mode, + '__init_kwargs__model__input_dim': input_dim, + '__init_kwargs__model__mode': mode, }) - if '__build_model' in contender: - contender.update({ - 'build_model': import_object_from_string(contender['__build_model']), - }) return contender + + +def plot_all_scores(contender_results, dir, auto_open=True): + Path(dir).mkdir(parents=True, exist_ok=True) + df = pd.DataFrame().from_records([{ + **pickle.loads(k), + **contender_results[k]} + for k in contender_results + ]) + fig = go.Figure() + for index, row in df.iterrows(): + fig.add_trace( + go.Box( + name=f"{row.name} {str(row['__model']).rsplit('.', 1)[1]}", + x=(f"{row.name}",), + y=row['scores'], + ), + ) + fig.update_layout( + xaxis_title='Model', + yaxis_title='Score', + template='none', + ) + print(f'ADFDAFDASFDAS writing ' + f"{dir}/all-scores.png") + silent_rm_file(f"{dir}/all-scores.png") + if os.path.isfile(f"{dir}/all-scores.png"): + raise FileExistsError(f"{dir}/all-scores.png") + fig.write_image(f"{dir}/all-scores.png") + print(f'writing ' + f"{dir}/all-scores.html") + silent_rm_file(f"{dir}/all-scores.html") + plotly.offline.plot(fig, filename=f"{dir}/all-scores.html", auto_open=auto_open) + return fig diff --git a/examples/model-tournament/config.py b/examples/model-tournament/config.py index 5e2d8d4..1d5407e 100644 --- a/examples/model-tournament/config.py +++ b/examples/model-tournament/config.py @@ -1,10 +1,10 @@ n_numeric_features = 10 n_informative_numeric_features = 5 -n_categorical_features = 1 +n_categorical_features = 2 make_regression_init_kwargs = { f'type_{i}': { - 'n_samples': 10_000, - 'noise': 10, + 'n_samples': round(10_000/n_categorical_features), + 'noise': 100, 'n_features': n_numeric_features, 'n_informative': n_informative_numeric_features, 'coef': True, @@ -13,43 +13,35 @@ for i in range(n_categorical_features) } test_size = 0.2 -n_splits = 1 +n_splits = 5 contenders_spec = [ { - # Anything with an underscore is a specially handled parameter + # This is the algo '__model': ['metaflow_helper.model_handlers.LightGBMRegressorHandler'], # These go to the model initializer - 'learning_rate': [0.1], - 'max_depth': [1, 2, 3], - 'n_estimators': [10_000], - # This goes to the pipeline elements' fitters by pipeline step stepname, where f'{stepname}__parameter' gets - # renamed to parameter and then passed to the fitter for step stepname. The model stepname = 'model' - # and the preprocessing stepname = 'preprocessor'. See utilities.build_pipeline. - '__fit_kwargs': [{ - 'model__eval_metric': 'mse', - 'model__early_stopping_rounds': 10, - 'model__verbose': 0, - }], + '__init_kwargs__model__learning_rate': [0.1], + '__init_kwargs__model__max_depth': [1, 2, 3], + '__init_kwargs__model__n_estimators': [10_000], + # These go to the model fitter + '__fit_kwargs__model__eval_metric': ['mse'], + '__fit_kwargs__model__early_stopping_rounds': [10], + '__fit_kwargs__model__verbose': [0], }, { - # Anything with an underscore is a specially handled parameter + # This is the algo '__model': ['metaflow_helper.model_handlers.KerasRegressorHandler'], - '__build_model': ['metaflow_helper.model_handlers.build_keras_regression_model'], # These go to the model initializer - 'metric': ['mse'], - 'dense_layer_widths': [(), (15,), (15, 15,), (15*15,)], - # This goes to the pipeline elements' fitters by pipeline step stepname, where f'{stepname}__parameter' gets - # renamed to parameter and then passed to the fitter for step stepname. The model stepname = 'model' - # and the preprocessing stepname = 'preprocessor'. See utilities.build_pipeline. - '__fit_kwargs': [{ - 'model__batch_size': None, - 'model__epochs': 10_000, - 'model__validation_split': 0.2, - 'model__eval_metric': 'val_mse', # monitor. Examples: 'mse' or 'val_mse' - 'model__verbose': 0, - 'model__patience': 10, - 'model__min_delta': 0.1, - }], + '__init_kwargs__model__build_model': ['metaflow_helper.model_handlers.build_keras_regression_model'], + '__init_kwargs__model__metric': ['mse'], + '__init_kwargs__model__dense_layer_widths': [(), (15,), (15, 15,), (15*15,)], + # These go to the model fitter + '__fit_kwargs__model__batch_size': [None], + '__fit_kwargs__model__epochs': [10_000], + '__fit_kwargs__model__validation_split': [0.2], + '__fit_kwargs__model__monitor': ['val_mse'], + '__fit_kwargs__model__verbose': [0], + '__fit_kwargs__model__patience': [10], + '__fit_kwargs__model__min_delta': [0.1], }, ] dependencies = [ diff --git a/examples/model-tournament/sandbox.ipynb b/examples/model-tournament/sandbox.ipynb index e399061..ebc0581 100644 --- a/examples/model-tournament/sandbox.ipynb +++ b/examples/model-tournament/sandbox.ipynb @@ -3,58 +3,69 @@ { "cell_type": "code", "execution_count": 1, - "id": "5e194d66-4454-4acc-a101-f1491d65ed20", + "id": "c93ee8bc-b210-40c9-9756-af80841aec98", "metadata": {}, "outputs": [], "source": [ - "from metaflow import Step, Flow, Run\n", - "\n", - "import utilities" + "%load_ext autoreload\n", + "%autoreload 2\n" ] }, { "cell_type": "code", "execution_count": 2, - "id": "224cdef4-58c1-4ab6-bb73-efd9278eb42a", + "id": "6b007649", "metadata": {}, "outputs": [], "source": [ - "run_id = '1620937510032366'" + "from metaflow import Step, Flow, Run\n", + "\n", + "import common" ] }, { "cell_type": "code", "execution_count": 3, - "id": "80ace6af-fd9e-4fcc-96c7-37208f566703", + "id": "77ae4f67", "metadata": {}, "outputs": [], "source": [ - "runs = Flow('Train/start')\n" + "run_id = '1621117548416977'" ] }, { "cell_type": "code", "execution_count": 4, - "id": "2dfee2e3-6629-4c5c-9e00-b4d47208549d", + "id": "60360600", "metadata": {}, "outputs": [], "source": [ - "steps = Step(f'Train/{run_id}/split_folds')\n" + "runs = Flow('Train/start')\n" ] }, { "cell_type": "code", "execution_count": 5, - "id": "0f13d56b-2fdf-4e62-8a46-d89bebffb643", + "id": "f3154dd2", + "metadata": {}, + "outputs": [], + "source": [ + "steps = Step(f'Train/{run_id}/end')\n" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "bb3b2302", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "" + "" ] }, - "execution_count": 5, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } @@ -66,8 +77,8 @@ }, { "cell_type": "code", - "execution_count": 6, - "id": "ef13299e-aa6f-4814-9103-8d98e2bf41d4", + "execution_count": 7, + "id": "ddcc6d74", "metadata": {}, "outputs": [ { @@ -91,604 +102,781 @@ " \n", " \n", " \n", - " target\n", - " num_0\n", - " num_1\n", - " num_2\n", - " num_3\n", - " num_4\n", - " num_5\n", - " num_6\n", - " num_7\n", - " num_8\n", - " num_9\n", - " cat\n", + " __model\n", + " __init_kwargs__model__n_estimators\n", + " __init_kwargs__model__max_depth\n", + " __init_kwargs__model__learning_rate\n", + " __fit_kwargs__model__verbose\n", + " __fit_kwargs__model__eval_metric\n", + " __fit_kwargs__model__early_stopping_rounds\n", + " __init_kwargs__model__input_dim\n", + " __init_kwargs__model__mode\n", + " scores\n", + " iterations\n", + " mean_score\n", + " sem_score\n", + " mean_iteration\n", + " sem_iteration\n", + " __init_kwargs__model__metric\n", + " __init_kwargs__model__dense_layer_widths\n", + " __init_kwargs__model__build_model\n", + " __fit_kwargs__model__validation_split\n", + " __fit_kwargs__model__patience\n", + " __fit_kwargs__model__min_delta\n", + " __fit_kwargs__model__epochs\n", + " __fit_kwargs__model__batch_size\n", " \n", " \n", " \n", " \n", " 0\n", - " -226.465449\n", - " -1.039309\n", - " -0.533254\n", - " 0.006352\n", - " -0.130216\n", - " -0.672371\n", - " -1.227693\n", - " -1.605115\n", - " 0.313087\n", - " 1.709311\n", - " 1.486217\n", - " type_0\n", + " metaflow_helper.model_handlers.LightGBMRegress...\n", + " 10000.0\n", + " 1.0\n", + " 0.1\n", + " 0\n", + " mse\n", + " 10.0\n", + " 12\n", + " RunMode.TEST\n", + " [0.45435876502509054, 0.4594686690039794, 0.43...\n", + " [376, 411, 337, 327, 318]\n", + " 0.443479\n", + " 0.005587\n", + " 353.8\n", + " 17.387927\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", " \n", " \n", " 1\n", - " 53.328963\n", - " 0.906268\n", - " 1.112101\n", - " -0.816500\n", - " 0.461619\n", - " 0.883569\n", - " 1.125719\n", - " -0.993897\n", - " 0.999854\n", - " -1.919401\n", - " -1.137031\n", - " type_0\n", + " metaflow_helper.model_handlers.LightGBMRegress...\n", + " 10000.0\n", + " 2.0\n", + " 0.1\n", + " 0\n", + " mse\n", + " 10.0\n", + " 12\n", + " RunMode.TEST\n", + " [0.5919671790832179, 0.5787376887464568, 0.542...\n", + " [324, 245, 221, 288, 236]\n", + " 0.567607\n", + " 0.008707\n", + " 262.8\n", + " 18.924587\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", " \n", " \n", " 2\n", - " 152.631640\n", - " 0.334137\n", - " 0.320004\n", - " -0.248267\n", - " -0.317444\n", - " 0.834343\n", - " 1.381073\n", - " 0.901058\n", - " -0.655725\n", - " 0.340868\n", - " -1.481551\n", - " type_0\n", + " metaflow_helper.model_handlers.LightGBMRegress...\n", + " 10000.0\n", + " 3.0\n", + " 0.1\n", + " 0\n", + " mse\n", + " 10.0\n", + " 12\n", + " RunMode.TEST\n", + " [0.5976603049819096, 0.5797762031425182, 0.553...\n", + " [184, 141, 147, 176, 156]\n", + " 0.575979\n", + " 0.007479\n", + " 160.8\n", + " 8.290959\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", " \n", " \n", " 3\n", - " -418.551943\n", - " 0.250441\n", - " -1.215110\n", - " -1.562450\n", - " 0.162566\n", - " -1.630155\n", - " -0.449801\n", - " -1.033361\n", - " -0.671750\n", - " -1.331549\n", - " -0.979638\n", - " type_0\n", + " metaflow_helper.model_handlers.KerasRegressorH...\n", + " NaN\n", + " NaN\n", + " NaN\n", + " 0\n", + " val_mse\n", + " NaN\n", + " 12\n", + " RunMode.TEST\n", + " [0.46582328410349294, 0.4699781935947053, 0.45...\n", + " [792, 828, 750, 706, 715]\n", + " 0.455353\n", + " 0.005382\n", + " 758.2\n", + " 23.100649\n", + " mse\n", + " ()\n", + " metaflow_helper.model_handlers.build_keras_reg...\n", + " 0.2\n", + " 10.0\n", + " 0.1\n", + " 10000.0\n", + " NaN\n", " \n", " \n", " 4\n", - " 7.570045\n", - " -1.440993\n", - " -0.388298\n", - " -0.431737\n", - " 0.518420\n", - " -0.405904\n", - " -0.785488\n", - " 1.008090\n", - " -0.695019\n", - " 1.885108\n", - " -0.913755\n", - " type_0\n", - " \n", - " \n", - " ...\n", - " ...\n", - " ...\n", - " ...\n", - " ...\n", - " ...\n", - " ...\n", - " ...\n", - " ...\n", - " ...\n", - " ...\n", - " ...\n", - " ...\n", - " \n", - " \n", - " 49995\n", - " -203.630169\n", - " -0.006985\n", - " -0.343568\n", - " -1.321507\n", - " 0.911448\n", - " -0.397213\n", - " -0.928320\n", - " 0.538747\n", - " -0.310263\n", - " -0.166743\n", - " -1.960105\n", - " type_4\n", - " \n", - " \n", - " 49996\n", - " -83.068843\n", - " 0.190101\n", - " 0.078127\n", - " -0.023049\n", - " -0.773157\n", - " 0.170425\n", - " -0.746559\n", - " -1.705857\n", - " -0.488374\n", - " -0.922338\n", - " -0.310841\n", - " type_4\n", + " metaflow_helper.model_handlers.KerasRegressorH...\n", + " NaN\n", + " NaN\n", + " NaN\n", + " 0\n", + " val_mse\n", + " NaN\n", + " 12\n", + " RunMode.TEST\n", + " [0.4660524930200155, 0.47029326150913775, 0.45...\n", + " [35, 46, 27, 32, 22]\n", + " 0.455214\n", + " 0.005563\n", + " 32.4\n", + " 4.057093\n", + " mse\n", + " (15,)\n", + " metaflow_helper.model_handlers.build_keras_reg...\n", + " 0.2\n", + " 10.0\n", + " 0.1\n", + " 10000.0\n", + " NaN\n", " \n", " \n", - " 49997\n", - " 69.608942\n", - " -0.333286\n", - " 0.906969\n", - " 0.031803\n", - " 0.147185\n", - " -0.310786\n", - " -0.359339\n", - " -2.461471\n", - " 0.010472\n", - " 0.366817\n", - " -0.055318\n", - " type_4\n", + " 5\n", + " metaflow_helper.model_handlers.KerasRegressorH...\n", + " NaN\n", + " NaN\n", + " NaN\n", + " 0\n", + " val_mse\n", + " NaN\n", + " 12\n", + " RunMode.TEST\n", + " [0.46607873291243973, 0.4703505796062878, 0.45...\n", + " [31, 42, 35, 30, 21]\n", + " 0.455257\n", + " 0.005562\n", + " 31.8\n", + " 3.426368\n", + " mse\n", + " (15, 15)\n", + " metaflow_helper.model_handlers.build_keras_reg...\n", + " 0.2\n", + " 10.0\n", + " 0.1\n", + " 10000.0\n", + " NaN\n", " \n", " \n", - " 49998\n", - " -133.474475\n", - " 0.822524\n", - " 0.290625\n", - " -0.628422\n", - " 0.444869\n", - " -1.667508\n", - " -1.604436\n", - " 0.001591\n", - " -0.784573\n", - " -1.157536\n", - " -1.121551\n", - " type_4\n", - " \n", - " \n", - " 49999\n", - " 193.794245\n", - " 0.500623\n", - " 0.926880\n", - " 1.669254\n", - " -0.959201\n", - " 0.927010\n", - " -0.758228\n", - " 1.142584\n", - " 0.470361\n", - " 0.519385\n", - " 0.717630\n", - " type_4\n", + " 6\n", + " metaflow_helper.model_handlers.KerasRegressorH...\n", + " NaN\n", + " NaN\n", + " NaN\n", + " 0\n", + " val_mse\n", + " NaN\n", + " 12\n", + " RunMode.TEST\n", + " [0.4662125782860408, 0.47010238615192557, 0.44...\n", + " [7, 24, 22, 13, 7]\n", + " 0.455034\n", + " 0.005648\n", + " 14.6\n", + " 3.613862\n", + " mse\n", + " (225,)\n", + " metaflow_helper.model_handlers.build_keras_reg...\n", + " 0.2\n", + " 10.0\n", + " 0.1\n", + " 10000.0\n", + " NaN\n", " \n", " \n", "\n", - "

50000 rows × 12 columns

\n", "" ], "text/plain": [ - " target num_0 num_1 num_2 num_3 num_4 num_5 \\\n", - "0 -226.465449 -1.039309 -0.533254 0.006352 -0.130216 -0.672371 -1.227693 \n", - "1 53.328963 0.906268 1.112101 -0.816500 0.461619 0.883569 1.125719 \n", - "2 152.631640 0.334137 0.320004 -0.248267 -0.317444 0.834343 1.381073 \n", - "3 -418.551943 0.250441 -1.215110 -1.562450 0.162566 -1.630155 -0.449801 \n", - "4 7.570045 -1.440993 -0.388298 -0.431737 0.518420 -0.405904 -0.785488 \n", - "... ... ... ... ... ... ... ... \n", - "49995 -203.630169 -0.006985 -0.343568 -1.321507 0.911448 -0.397213 -0.928320 \n", - "49996 -83.068843 0.190101 0.078127 -0.023049 -0.773157 0.170425 -0.746559 \n", - "49997 69.608942 -0.333286 0.906969 0.031803 0.147185 -0.310786 -0.359339 \n", - "49998 -133.474475 0.822524 0.290625 -0.628422 0.444869 -1.667508 -1.604436 \n", - "49999 193.794245 0.500623 0.926880 1.669254 -0.959201 0.927010 -0.758228 \n", + " __model \\\n", + "0 metaflow_helper.model_handlers.LightGBMRegress... \n", + "1 metaflow_helper.model_handlers.LightGBMRegress... \n", + "2 metaflow_helper.model_handlers.LightGBMRegress... \n", + "3 metaflow_helper.model_handlers.KerasRegressorH... \n", + "4 metaflow_helper.model_handlers.KerasRegressorH... \n", + "5 metaflow_helper.model_handlers.KerasRegressorH... \n", + "6 metaflow_helper.model_handlers.KerasRegressorH... \n", + "\n", + " __init_kwargs__model__n_estimators __init_kwargs__model__max_depth \\\n", + "0 10000.0 1.0 \n", + "1 10000.0 2.0 \n", + "2 10000.0 3.0 \n", + "3 NaN NaN \n", + "4 NaN NaN \n", + "5 NaN NaN \n", + "6 NaN NaN \n", + "\n", + " __init_kwargs__model__learning_rate __fit_kwargs__model__verbose \\\n", + "0 0.1 0 \n", + "1 0.1 0 \n", + "2 0.1 0 \n", + "3 NaN 0 \n", + "4 NaN 0 \n", + "5 NaN 0 \n", + "6 NaN 0 \n", + "\n", + " __fit_kwargs__model__eval_metric \\\n", + "0 mse \n", + "1 mse \n", + "2 mse \n", + "3 val_mse \n", + "4 val_mse \n", + "5 val_mse \n", + "6 val_mse \n", + "\n", + " __fit_kwargs__model__early_stopping_rounds \\\n", + "0 10.0 \n", + "1 10.0 \n", + "2 10.0 \n", + "3 NaN \n", + "4 NaN \n", + "5 NaN \n", + "6 NaN \n", + "\n", + " __init_kwargs__model__input_dim __init_kwargs__model__mode \\\n", + "0 12 RunMode.TEST \n", + "1 12 RunMode.TEST \n", + "2 12 RunMode.TEST \n", + "3 12 RunMode.TEST \n", + "4 12 RunMode.TEST \n", + "5 12 RunMode.TEST \n", + "6 12 RunMode.TEST \n", "\n", - " num_6 num_7 num_8 num_9 cat \n", - "0 -1.605115 0.313087 1.709311 1.486217 type_0 \n", - "1 -0.993897 0.999854 -1.919401 -1.137031 type_0 \n", - "2 0.901058 -0.655725 0.340868 -1.481551 type_0 \n", - "3 -1.033361 -0.671750 -1.331549 -0.979638 type_0 \n", - "4 1.008090 -0.695019 1.885108 -0.913755 type_0 \n", - "... ... ... ... ... ... \n", - "49995 0.538747 -0.310263 -0.166743 -1.960105 type_4 \n", - "49996 -1.705857 -0.488374 -0.922338 -0.310841 type_4 \n", - "49997 -2.461471 0.010472 0.366817 -0.055318 type_4 \n", - "49998 0.001591 -0.784573 -1.157536 -1.121551 type_4 \n", - "49999 1.142584 0.470361 0.519385 0.717630 type_4 \n", + " scores \\\n", + "0 [0.45435876502509054, 0.4594686690039794, 0.43... \n", + "1 [0.5919671790832179, 0.5787376887464568, 0.542... \n", + "2 [0.5976603049819096, 0.5797762031425182, 0.553... \n", + "3 [0.46582328410349294, 0.4699781935947053, 0.45... \n", + "4 [0.4660524930200155, 0.47029326150913775, 0.45... \n", + "5 [0.46607873291243973, 0.4703505796062878, 0.45... \n", + "6 [0.4662125782860408, 0.47010238615192557, 0.44... \n", "\n", - "[50000 rows x 12 columns]" + " iterations mean_score sem_score mean_iteration \\\n", + "0 [376, 411, 337, 327, 318] 0.443479 0.005587 353.8 \n", + "1 [324, 245, 221, 288, 236] 0.567607 0.008707 262.8 \n", + "2 [184, 141, 147, 176, 156] 0.575979 0.007479 160.8 \n", + "3 [792, 828, 750, 706, 715] 0.455353 0.005382 758.2 \n", + "4 [35, 46, 27, 32, 22] 0.455214 0.005563 32.4 \n", + "5 [31, 42, 35, 30, 21] 0.455257 0.005562 31.8 \n", + "6 [7, 24, 22, 13, 7] 0.455034 0.005648 14.6 \n", + "\n", + " sem_iteration __init_kwargs__model__metric \\\n", + "0 17.387927 NaN \n", + "1 18.924587 NaN \n", + "2 8.290959 NaN \n", + "3 23.100649 mse \n", + "4 4.057093 mse \n", + "5 3.426368 mse \n", + "6 3.613862 mse \n", + "\n", + " __init_kwargs__model__dense_layer_widths \\\n", + "0 NaN \n", + "1 NaN \n", + "2 NaN \n", + "3 () \n", + "4 (15,) \n", + "5 (15, 15) \n", + "6 (225,) \n", + "\n", + " __init_kwargs__model__build_model \\\n", + "0 NaN \n", + "1 NaN \n", + "2 NaN \n", + "3 metaflow_helper.model_handlers.build_keras_reg... \n", + "4 metaflow_helper.model_handlers.build_keras_reg... \n", + "5 metaflow_helper.model_handlers.build_keras_reg... \n", + "6 metaflow_helper.model_handlers.build_keras_reg... \n", + "\n", + " __fit_kwargs__model__validation_split __fit_kwargs__model__patience \\\n", + "0 NaN NaN \n", + "1 NaN NaN \n", + "2 NaN NaN \n", + "3 0.2 10.0 \n", + "4 0.2 10.0 \n", + "5 0.2 10.0 \n", + "6 0.2 10.0 \n", + "\n", + " __fit_kwargs__model__min_delta __fit_kwargs__model__epochs \\\n", + "0 NaN NaN \n", + "1 NaN NaN \n", + "2 NaN NaN \n", + "3 0.1 10000.0 \n", + "4 0.1 10000.0 \n", + "5 0.1 10000.0 \n", + "6 0.1 10000.0 \n", + "\n", + " __fit_kwargs__model__batch_size \n", + "0 NaN \n", + "1 NaN \n", + "2 NaN \n", + "3 NaN \n", + "4 NaN \n", + "5 NaN \n", + "6 NaN " ] }, - "execution_count": 6, "metadata": {}, - "output_type": "execute_result" + "output_type": "display_data" } ], "source": [ - "data.df" + "import pandas as pd\n", + "import pickle\n", + "\n", + "df = pd.DataFrame().from_records([{\n", + " **pickle.loads(k),\n", + " **data.contender_results[k]}\n", + " for k in data.contender_results\n", + "])\n", + "with pd.option_context('display.max_rows', 100, 'display.max_columns', 100):\n", + " display(df)\n" ] }, { "cell_type": "code", - "execution_count": 7, - "id": "40342e7d-19fd-4cd4-b595-c5c23d322df4", + "execution_count": 8, + "id": "9ce61d47-dddc-429e-af43-b6657e0a3be3", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{'max_depth': 1,\n", - " 'learning_rate': 0.1,\n", - " '__model': 'utilities.LightGBMHandler',\n", - " '__fit_kwargs': {'model__eval_metric': 'mse',\n", - " 'model__early_stopping_rounds': 10,\n", - " 'model__verbose': 1}}" + "[{'__fit_kwargs__model__early_stopping_rounds': 10,\n", + " '__fit_kwargs__model__eval_metric': 'mse',\n", + " '__fit_kwargs__model__verbose': 0,\n", + " '__init_kwargs__model__learning_rate': 0.1,\n", + " '__init_kwargs__model__max_depth': 1,\n", + " '__init_kwargs__model__n_estimators': 10000,\n", + " '__model': 'metaflow_helper.model_handlers.LightGBMRegressorHandler'},\n", + " {'__fit_kwargs__model__early_stopping_rounds': 10,\n", + " '__fit_kwargs__model__eval_metric': 'mse',\n", + " '__fit_kwargs__model__verbose': 0,\n", + " '__init_kwargs__model__learning_rate': 0.1,\n", + " '__init_kwargs__model__max_depth': 2,\n", + " '__init_kwargs__model__n_estimators': 10000,\n", + " '__model': 'metaflow_helper.model_handlers.LightGBMRegressorHandler'},\n", + " {'__fit_kwargs__model__early_stopping_rounds': 10,\n", + " '__fit_kwargs__model__eval_metric': 'mse',\n", + " '__fit_kwargs__model__verbose': 0,\n", + " '__init_kwargs__model__learning_rate': 0.1,\n", + " '__init_kwargs__model__max_depth': 3,\n", + " '__init_kwargs__model__n_estimators': 10000,\n", + " '__model': 'metaflow_helper.model_handlers.LightGBMRegressorHandler'},\n", + " {'__fit_kwargs__model__batch_size': None,\n", + " '__fit_kwargs__model__epochs': 10000,\n", + " '__fit_kwargs__model__eval_metric': 'val_mse',\n", + " '__fit_kwargs__model__min_delta': 0.1,\n", + " '__fit_kwargs__model__patience': 10,\n", + " '__fit_kwargs__model__validation_split': 0.2,\n", + " '__fit_kwargs__model__verbose': 0,\n", + " '__init_kwargs__model__build_model': 'metaflow_helper.model_handlers.build_keras_regression_model',\n", + " '__init_kwargs__model__dense_layer_widths': (),\n", + " '__init_kwargs__model__metric': 'mse',\n", + " '__model': 'metaflow_helper.model_handlers.KerasRegressorHandler'},\n", + " {'__fit_kwargs__model__batch_size': None,\n", + " '__fit_kwargs__model__epochs': 10000,\n", + " '__fit_kwargs__model__eval_metric': 'val_mse',\n", + " '__fit_kwargs__model__min_delta': 0.1,\n", + " '__fit_kwargs__model__patience': 10,\n", + " '__fit_kwargs__model__validation_split': 0.2,\n", + " '__fit_kwargs__model__verbose': 0,\n", + " '__init_kwargs__model__build_model': 'metaflow_helper.model_handlers.build_keras_regression_model',\n", + " '__init_kwargs__model__dense_layer_widths': (15,),\n", + " '__init_kwargs__model__metric': 'mse',\n", + " '__model': 'metaflow_helper.model_handlers.KerasRegressorHandler'},\n", + " {'__fit_kwargs__model__batch_size': None,\n", + " '__fit_kwargs__model__epochs': 10000,\n", + " '__fit_kwargs__model__eval_metric': 'val_mse',\n", + " '__fit_kwargs__model__min_delta': 0.1,\n", + " '__fit_kwargs__model__patience': 10,\n", + " '__fit_kwargs__model__validation_split': 0.2,\n", + " '__fit_kwargs__model__verbose': 0,\n", + " '__init_kwargs__model__build_model': 'metaflow_helper.model_handlers.build_keras_regression_model',\n", + " '__init_kwargs__model__dense_layer_widths': (15, 15),\n", + " '__init_kwargs__model__metric': 'mse',\n", + " '__model': 'metaflow_helper.model_handlers.KerasRegressorHandler'},\n", + " {'__fit_kwargs__model__batch_size': None,\n", + " '__fit_kwargs__model__epochs': 10000,\n", + " '__fit_kwargs__model__eval_metric': 'val_mse',\n", + " '__fit_kwargs__model__min_delta': 0.1,\n", + " '__fit_kwargs__model__patience': 10,\n", + " '__fit_kwargs__model__validation_split': 0.2,\n", + " '__fit_kwargs__model__verbose': 0,\n", + " '__init_kwargs__model__build_model': 'metaflow_helper.model_handlers.build_keras_regression_model',\n", + " '__init_kwargs__model__dense_layer_widths': (225,),\n", + " '__init_kwargs__model__metric': 'mse',\n", + " '__model': 'metaflow_helper.model_handlers.KerasRegressorHandler'}]" ] }, - "execution_count": 7, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "data.hyperparameters" + "list(data.contenders)" ] }, { "cell_type": "code", - "execution_count": 8, - "id": "a4b5fcd4-c55e-45b8-b728-b864e8ed3375", + "execution_count": 9, + "id": "fcff38a3-fdfe-4204-b0b2-ccc80a8b1f86", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "0" + "0 [0.45435876502509054, 0.4594686690039794, 0.43...\n", + "1 [0.5919671790832179, 0.5787376887464568, 0.542...\n", + "2 [0.5976603049819096, 0.5797762031425182, 0.553...\n", + "3 [0.46582328410349294, 0.4699781935947053, 0.45...\n", + "4 [0.4660524930200155, 0.47029326150913775, 0.45...\n", + "5 [0.46607873291243973, 0.4703505796062878, 0.45...\n", + "6 [0.4662125782860408, 0.47010238615192557, 0.44...\n", + "Name: scores, dtype: object" ] }, - "execution_count": 8, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "data.fold" + "df['scores']" ] }, { "cell_type": "code", "execution_count": 10, - "id": "9674f087-77df-4e9a-848f-91e64f87a26e", + "id": "26f3031f-f8e8-42dd-bbbc-f6622de6c93f", "metadata": {}, "outputs": [ { - "ename": "ValueError", - "evalue": "DataFrame.dtypes for data must be int, float or bool.\nDid not expect the data types in the following fields: cat", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 40\u001b[0m \u001b[0mmodel\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mmodel_handler_class\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0;34m{\u001b[0m\u001b[0mk\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mv\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mk\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mv\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mhyperparameters\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mitems\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mk\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mstartswith\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'__'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 41\u001b[0m )\n\u001b[0;32m---> 42\u001b[0;31m \u001b[0mpipeline\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfit\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mX_train\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0my_train\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmodel__validation_data\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mX_test\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0my_test\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mfit_kwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", - "\u001b[0;32m~/repos/metalearn/venv/lib/python3.7/site-packages/sklearn/pipeline.py\u001b[0m in \u001b[0;36mfit\u001b[0;34m(self, X, y, **fit_params)\u001b[0m\n\u001b[1;32m 344\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_final_estimator\u001b[0m \u001b[0;34m!=\u001b[0m \u001b[0;34m'passthrough'\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 345\u001b[0m \u001b[0mfit_params_last_step\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfit_params_steps\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msteps\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 346\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_final_estimator\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfit\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mXt\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0my\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mfit_params_last_step\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 347\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 348\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/repos/metalearn/examples/model-tournament/utilities.py\u001b[0m in \u001b[0;36mfit\u001b[0;34m(self, X, y, validation_data, **kwargs)\u001b[0m\n\u001b[1;32m 55\u001b[0m \u001b[0my\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 56\u001b[0m \u001b[0meval_set\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mvalidation_data\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 57\u001b[0;31m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 58\u001b[0m )\n\u001b[1;32m 59\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/repos/metalearn/venv/lib/python3.7/site-packages/lightgbm/sklearn.py\u001b[0m in \u001b[0;36mfit\u001b[0;34m(self, X, y, sample_weight, init_score, eval_set, eval_names, eval_sample_weight, eval_init_score, eval_metric, early_stopping_rounds, verbose, feature_name, categorical_feature, callbacks, init_model)\u001b[0m\n\u001b[1;32m 820\u001b[0m \u001b[0meval_init_score\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0meval_init_score\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0meval_metric\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0meval_metric\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 821\u001b[0m \u001b[0mearly_stopping_rounds\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mearly_stopping_rounds\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mverbose\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mverbose\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfeature_name\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mfeature_name\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 822\u001b[0;31m categorical_feature=categorical_feature, callbacks=callbacks, init_model=init_model)\n\u001b[0m\u001b[1;32m 823\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 824\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/repos/metalearn/venv/lib/python3.7/site-packages/lightgbm/sklearn.py\u001b[0m in \u001b[0;36mfit\u001b[0;34m(self, X, y, sample_weight, init_score, group, eval_set, eval_names, eval_sample_weight, eval_class_weight, eval_init_score, eval_group, eval_metric, early_stopping_rounds, verbose, feature_name, categorical_feature, callbacks, init_model)\u001b[0m\n\u001b[1;32m 686\u001b[0m \u001b[0mevals_result\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mevals_result\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfobj\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_fobj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfeval\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0meval_metrics_callable\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 687\u001b[0m \u001b[0mverbose_eval\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mverbose\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfeature_name\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mfeature_name\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 688\u001b[0;31m callbacks=callbacks, init_model=init_model)\n\u001b[0m\u001b[1;32m 689\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 690\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mevals_result\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/repos/metalearn/venv/lib/python3.7/site-packages/lightgbm/engine.py\u001b[0m in \u001b[0;36mtrain\u001b[0;34m(params, train_set, num_boost_round, valid_sets, valid_names, fobj, feval, init_model, feature_name, categorical_feature, early_stopping_rounds, evals_result, verbose_eval, learning_rates, keep_training_booster, callbacks)\u001b[0m\n\u001b[1;32m 230\u001b[0m \u001b[0mbooster\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mset_train_data_name\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtrain_data_name\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 231\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mvalid_set\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mname_valid_set\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mzip\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mreduced_valid_sets\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mname_valid_sets\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 232\u001b[0;31m \u001b[0mbooster\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0madd_valid\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvalid_set\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mname_valid_set\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 233\u001b[0m \u001b[0;32mfinally\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 234\u001b[0m \u001b[0mtrain_set\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_reverse_update_params\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/repos/metalearn/venv/lib/python3.7/site-packages/lightgbm/basic.py\u001b[0m in \u001b[0;36madd_valid\u001b[0;34m(self, data, name)\u001b[0m\n\u001b[1;32m 2557\u001b[0m _safe_call(_LIB.LGBM_BoosterAddValidData(\n\u001b[1;32m 2558\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mhandle\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 2559\u001b[0;31m data.construct().handle))\n\u001b[0m\u001b[1;32m 2560\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mvalid_sets\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdata\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2561\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mname_valid_sets\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/repos/metalearn/venv/lib/python3.7/site-packages/lightgbm/basic.py\u001b[0m in \u001b[0;36mconstruct\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 1438\u001b[0m \u001b[0mweight\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mweight\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mgroup\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mgroup\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1439\u001b[0m \u001b[0minit_score\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0minit_score\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mpredictor\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_predictor\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1440\u001b[0;31m silent=self.silent, feature_name=self.feature_name, params=self.params)\n\u001b[0m\u001b[1;32m 1441\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1442\u001b[0m \u001b[0;31m# construct subset\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/repos/metalearn/venv/lib/python3.7/site-packages/lightgbm/basic.py\u001b[0m in \u001b[0;36m_lazy_init\u001b[0;34m(self, data, label, reference, weight, group, init_score, predictor, silent, feature_name, categorical_feature, params)\u001b[0m\n\u001b[1;32m 1210\u001b[0m \u001b[0mfeature_name\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1211\u001b[0m \u001b[0mcategorical_feature\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1212\u001b[0;31m self.pandas_categorical)\n\u001b[0m\u001b[1;32m 1213\u001b[0m \u001b[0mlabel\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0m_label_from_pandas\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlabel\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1214\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/repos/metalearn/venv/lib/python3.7/site-packages/lightgbm/basic.py\u001b[0m in \u001b[0;36m_data_from_pandas\u001b[0;34m(data, feature_name, categorical_feature, pandas_categorical)\u001b[0m\n\u001b[1;32m 537\u001b[0m raise ValueError(\"DataFrame.dtypes for data must be int, float or bool.\\n\"\n\u001b[1;32m 538\u001b[0m \u001b[0;34m\"Did not expect the data types in the following fields: \"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 539\u001b[0;31m + ', '.join(data.columns[bad_indices]))\n\u001b[0m\u001b[1;32m 540\u001b[0m \u001b[0mdata\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdata\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mvalues\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 541\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mdata\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdtype\u001b[0m \u001b[0;34m!=\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfloat32\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mdata\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdtype\u001b[0m \u001b[0;34m!=\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfloat64\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mValueError\u001b[0m: DataFrame.dtypes for data must be int, float or bool.\nDid not expect the data types in the following fields: cat" - ] + "data": { + "text/plain": [ + "'~/repos/metaflow-helper/examples/model-tournament/results/1621117548416977'" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ - "import pickle\n", - "from scipy import stats\n", - "import numpy as np\n", - "from metaflow import FlowSpec, step\n", - "from sklearn.model_selection import train_test_split, ParameterGrid, KFold\n", - "from sklearn.metrics import r2_score\n", - "import config\n", - "import utilities\n", - "\n", - "\n", - "hyperparameters = data.hyperparameters\n", - "fit_kwargs = hyperparameters['__fit_kwargs']\n", - "\n", - "X = data.df.loc[data.train_validation_index, :]\n", - "y = data.df.loc[data.train_validation_index, 'target']\n", - "if data.k_fold is not None:\n", - " train, test = list(data.k_fold.split(X))[data.fold]\n", - "else:\n", - " train, test = train_test_split(list(range(X.shape[0])), test_size=0.2)\n", - "X_train = X.iloc[train, :]\n", - "y_train = y.iloc[train]\n", - "X_test = X.iloc[test, :]\n", - "y_test = y.iloc[test]\n", - "\n", - "if hyperparameters['__model'] == 'utilities.KerasHandler':\n", - " pipeline = utilities.build_pipeline(\n", - " numeric_features=data.numeric_features,\n", - " categorical_features=data.categorical_features,\n", - " )\n", - " X_train_transformed = pipeline.fit_transform(X_train)\n", - " hyperparameters.update({\n", - " 'input_dim': X_train_transformed.shape[1],\n", - " })\n", - "\n", - "model_handler_class = utilities.import_object_from_string(hyperparameters['__model'])\n", - "\n", - "pipeline = utilities.build_pipeline(\n", - " numeric_features=data.numeric_features,\n", - " categorical_features=data.categorical_features,\n", - " model=model_handler_class(**{k: v for k, v in hyperparameters.items() if not k.startswith('__')}),\n", - ")\n", - "pipeline.fit(X_train, y_train, model__validation_data=(X_test, y_test), **fit_kwargs)\n" + "f'~/repos/metaflow-helper/examples/model-tournament/results/{run_id}'" ] }, { "cell_type": "code", "execution_count": 11, - "id": "d6a7391d-a9a5-44e7-ae00-1d74928035e4", + "id": "f557c890", "metadata": {}, "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ADFDAFDASFDAS writing /Users/fwhigh/repos/metaflow-helper/examples/model-tournament/results/1621117548416977/all-scores.png\n", + "writing /Users/fwhigh/repos/metaflow-helper/examples/model-tournament/results/1621117548416977/all-scores.html\n" + ] + }, { "data": { "text/html": [ - "
\n", - "plotly-logomark\"}}},{}],758:[function(t,e,r){\"use strict\";r.isLeftAnchor=function(t){return\"left\"===t.xanchor||\"auto\"===t.xanchor&&t.x<=1/3},r.isCenterAnchor=function(t){return\"center\"===t.xanchor||\"auto\"===t.xanchor&&t.x>1/3&&t.x<2/3},r.isRightAnchor=function(t){return\"right\"===t.xanchor||\"auto\"===t.xanchor&&t.x>=2/3},r.isTopAnchor=function(t){return\"top\"===t.yanchor||\"auto\"===t.yanchor&&t.y>=2/3},r.isMiddleAnchor=function(t){return\"middle\"===t.yanchor||\"auto\"===t.yanchor&&t.y>1/3&&t.y<2/3},r.isBottomAnchor=function(t){return\"bottom\"===t.yanchor||\"auto\"===t.yanchor&&t.y<=1/3}},{}],759:[function(t,e,r){\"use strict\";var n=t(\"./mod\"),i=n.mod,a=n.modHalf,o=Math.PI,s=2*o;function l(t){return Math.abs(t[1]-t[0])>s-1e-14}function c(t,e){return a(e-t,s)}function u(t,e){if(l(e))return!0;var r,n;e[0](n=i(n,s))&&(n+=s);var a=i(t,s),o=a+s;return a>=r&&a<=n||o>=r&&o<=n}function f(t,e,r,n,i,a,c){i=i||0,a=a||0;var u,f,h,p,d,g=l([r,n]);function m(t,e){return[t*Math.cos(e)+i,a-t*Math.sin(e)]}g?(u=0,f=o,h=s):r=i&&t<=a);var i,a},pathArc:function(t,e,r,n,i){return f(null,t,e,r,n,i,0)},pathSector:function(t,e,r,n,i){return f(null,t,e,r,n,i,1)},pathAnnulus:function(t,e,r,n,i,a){return f(t,e,r,n,i,a,1)}}},{\"./mod\":785}],760:[function(t,e,r){\"use strict\";var n=Array.isArray,i=\"undefined\"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer:{isView:function(){return!1}},a=\"undefined\"==typeof DataView?function(){}:DataView;function o(t){return i.isView(t)&&!(t instanceof a)}function s(t){return n(t)||o(t)}function l(t,e,r){if(s(t)){if(s(t[0])){for(var n=r,i=0;ii.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,i){t%1||!n(t)||void 0!==i.min&&ti.max?e.set(r):e.set(+t)}},string:{coerceFunction:function(t,e,r,n){if(\"string\"!=typeof t){var i=\"number\"==typeof t;!0!==n.strict&&i?e.set(String(t)):e.set(r)}else n.noBlank&&!t?e.set(r):e.set(t)}},color:{coerceFunction:function(t,e,r){i(t).isValid()?e.set(t):e.set(r)}},colorlist:{coerceFunction:function(t,e,r){Array.isArray(t)&&t.length&&t.every((function(t){return i(t).isValid()}))?e.set(t):e.set(r)}},colorscale:{coerceFunction:function(t,e,r){e.set(o.get(t,r))}},angle:{coerceFunction:function(t,e,r){\"auto\"===t?e.set(\"auto\"):n(t)?e.set(u(+t,360)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r,n){var i=n.regex||c(r);\"string\"==typeof t&&i.test(t)?e.set(t):e.set(r)},validateFunction:function(t,e){var r=e.dflt;return t===r||\"string\"==typeof t&&!!c(r).test(t)}},flaglist:{coerceFunction:function(t,e,r,n){if(\"string\"==typeof t)if(-1===(n.extras||[]).indexOf(t)){for(var i=t.split(\"+\"),a=0;a=n&&t<=i?t:u}if(\"string\"!=typeof t&&\"number\"!=typeof t)return u;t=String(t);var c=_(e),v=t.charAt(0);!c||\"G\"!==v&&\"g\"!==v||(t=t.substr(1),e=\"\");var w=c&&\"chinese\"===e.substr(0,7),T=t.match(w?x:y);if(!T)return u;var k=T[1],M=T[3]||\"1\",A=Number(T[5]||1),S=Number(T[7]||0),E=Number(T[9]||0),C=Number(T[11]||0);if(c){if(2===k.length)return u;var L;k=Number(k);try{var I=m.getComponentMethod(\"calendars\",\"getCal\")(e);if(w){var P=\"i\"===M.charAt(M.length-1);M=parseInt(M,10),L=I.newDate(k,I.toMonthIndex(k,M,P),A)}else L=I.newDate(k,Number(M),A)}catch(t){return u}return L?(L.toJD()-g)*f+S*h+E*p+C*d:u}k=2===k.length?(Number(k)+2e3-b)%100+b:Number(k),M-=1;var z=new Date(Date.UTC(2e3,M,A,S,E));return z.setUTCFullYear(k),z.getUTCMonth()!==M||z.getUTCDate()!==A?u:z.getTime()+C*d},n=r.MIN_MS=r.dateTime2ms(\"-9999\"),i=r.MAX_MS=r.dateTime2ms(\"9999-12-31 23:59:59.9999\"),r.isDateTime=function(t,e){return r.dateTime2ms(t,e)!==u};var T=90*f,k=3*h,M=5*p;function A(t,e,r,n,i){if((e||r||n||i)&&(t+=\" \"+w(e,2)+\":\"+w(r,2),(n||i)&&(t+=\":\"+w(n,2),i))){for(var a=4;i%10==0;)a-=1,i/=10;t+=\".\"+w(i,a)}return t}r.ms2DateTime=function(t,e,r){if(\"number\"!=typeof t||!(t>=n&&t<=i))return u;e||(e=0);var a,o,s,c,y,x,b=Math.floor(10*l(t+.05,1)),w=Math.round(t-b/10);if(_(r)){var S=Math.floor(w/f)+g,E=Math.floor(l(t,f));try{a=m.getComponentMethod(\"calendars\",\"getCal\")(r).fromJD(S).formatDate(\"yyyy-mm-dd\")}catch(t){a=v(\"G%Y-%m-%d\")(new Date(w))}if(\"-\"===a.charAt(0))for(;a.length<11;)a=\"-0\"+a.substr(1);else for(;a.length<10;)a=\"0\"+a;o=e=n+f&&t<=i-f))return u;var e=Math.floor(10*l(t+.05,1)),r=new Date(Math.round(t-e/10));return A(a(\"%Y-%m-%d\")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},r.cleanDate=function(t,e,n){if(t===u)return e;if(r.isJSDate(t)||\"number\"==typeof t&&isFinite(t)){if(_(n))return s.error(\"JS Dates and milliseconds are incompatible with world calendars\",t),e;if(!(t=r.ms2DateTimeLocal(+t))&&void 0!==e)return e}else if(!r.isDateTime(t,n))return s.error(\"unrecognized date\",t),e;return t};var S=/%\\d?f/g;function E(t,e,r,n){t=t.replace(S,(function(t){var r=Math.min(+t.charAt(1)||6,6);return(e/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,\"\")||\"0\"}));var i=new Date(Math.floor(e+.05));if(_(n))try{t=m.getComponentMethod(\"calendars\",\"worldCalFmt\")(t,e,n)}catch(t){return\"Invalid\"}return r(t)(i)}var C=[59,59.9,59.99,59.999,59.9999];r.formatDate=function(t,e,r,n,i,a){if(i=_(i)&&i,!e)if(\"y\"===r)e=a.year;else if(\"m\"===r)e=a.month;else{if(\"d\"!==r)return function(t,e){var r=l(t+.05,f),n=w(Math.floor(r/h),2)+\":\"+w(l(Math.floor(r/p),60),2);if(\"M\"!==e){o(e)||(e=0);var i=(100+Math.min(l(t/d,60),C[e])).toFixed(e).substr(1);e>0&&(i=i.replace(/0+$/,\"\").replace(/[\\.]$/,\"\")),n+=\":\"+i}return n}(t,r)+\"\\n\"+E(a.dayMonthYear,t,n,i);e=a.dayMonth+\"\\n\"+a.year}return E(e,t,n,i)};var L=3*f;r.incrementMonth=function(t,e,r){r=_(r)&&r;var n=l(t,f);if(t=Math.round(t-n),r)try{var i=Math.round(t/f)+g,a=m.getComponentMethod(\"calendars\",\"getCal\")(r),o=a.fromJD(i);return e%12?a.add(o,e,\"m\"):a.add(o,e/12,\"y\"),(o.toJD()-g)*f+n}catch(e){s.error(\"invalid ms \"+t+\" in calendar \"+r)}var c=new Date(t+L);return c.setUTCMonth(c.getUTCMonth()+e)+n-L},r.findExactDates=function(t,e){for(var r,n,i=0,a=0,s=0,l=0,c=_(e)&&m.getComponentMethod(\"calendars\",\"getCal\")(e),u=0;u0&&t[e+1][0]<0)return e;return null}switch(e=\"RUS\"===s||\"FJI\"===s?function(t){var e;if(null===c(t))e=t;else for(e=new Array(t.length),i=0;ie?r[n++]=[t[i][0]+360,t[i][1]]:i===e?(r[n++]=t[i],r[n++]=[t[i][0],-90]):r[n++]=t[i];var a=h.tester(r);a.pts.pop(),l.push(a)}:function(t){l.push(h.tester(t))},a.type){case\"MultiPolygon\":for(r=0;ri&&(i=c,e=l)}else e=r;return o.default(e).geometry.coordinates}(u),n.fIn=t,n.fOut=u,s.push(u)}else c.log([\"Location\",n.loc,\"does not have a valid GeoJSON geometry.\",\"Traces with locationmode *geojson-id* only support\",\"*Polygon* and *MultiPolygon* geometries.\"].join(\" \"))}delete i[r]}switch(r.type){case\"FeatureCollection\":var h=r.features;for(n=0;n100?(clearInterval(a),n(\"Unexpected error while fetching from \"+t)):void i++}),50)}))}for(var o=0;o0&&(r.push(i),i=[])}return i.length>0&&r.push(i),r},r.makeLine=function(t){return 1===t.length?{type:\"LineString\",coordinates:t[0]}:{type:\"MultiLineString\",coordinates:t}},r.makePolygon=function(t){if(1===t.length)return{type:\"Polygon\",coordinates:t};for(var e=new Array(t.length),r=0;r1||g<0||g>1?null:{x:t+l*g,y:e+f*g}}function l(t,e,r,n,i){var a=n*t+i*e;if(a<0)return n*n+i*i;if(a>r){var o=n-t,s=i-e;return o*o+s*s}var l=n*e-i*t;return l*l/r}r.segmentsIntersect=s,r.segmentDistance=function(t,e,r,n,i,a,o,c){if(s(t,e,r,n,i,a,o,c))return 0;var u=r-t,f=n-e,h=o-i,p=c-a,d=u*u+f*f,g=h*h+p*p,m=Math.min(l(u,f,d,i-t,a-e),l(u,f,d,o-t,c-e),l(h,p,g,t-i,e-a),l(h,p,g,r-i,n-a));return Math.sqrt(m)},r.getTextLocation=function(t,e,r,s){if(t===i&&s===a||(n={},i=t,a=s),n[r])return n[r];var l=t.getPointAtLength(o(r-s/2,e)),c=t.getPointAtLength(o(r+s/2,e)),u=Math.atan((c.y-l.y)/(c.x-l.x)),f=t.getPointAtLength(o(r,e)),h={x:(4*f.x+l.x+c.x)/6,y:(4*f.y+l.y+c.y)/6,theta:u};return n[r]=h,h},r.clearLocationCache=function(){i=null},r.getVisibleSegment=function(t,e,r){var n,i,a=e.left,o=e.right,s=e.top,l=e.bottom,c=0,u=t.getTotalLength(),f=u;function h(e){var r=t.getPointAtLength(e);0===e?n=r:e===u&&(i=r);var c=r.xo?r.x-o:0,f=r.yl?r.y-l:0;return Math.sqrt(c*c+f*f)}for(var p=h(c);p;){if((c+=p+r)>f)return;p=h(c)}for(p=h(f);p;){if(c>(f-=p+r))return;p=h(f)}return{min:c,max:f,len:f-c,total:u,isClosed:0===c&&f===u&&Math.abs(n.x-i.x)<.1&&Math.abs(n.y-i.y)<.1}},r.findPointOnPath=function(t,e,r,n){for(var i,a,o,s=(n=n||{}).pathLength||t.getTotalLength(),l=n.tolerance||.001,c=n.iterationLimit||30,u=t.getPointAtLength(0)[r]>t.getPointAtLength(s)[r]?-1:1,f=0,h=0,p=s;f0?p=i:h=i,f++}return a}},{\"./mod\":785}],774:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"tinycolor2\"),a=t(\"color-normalize\"),o=t(\"../components/colorscale\"),s=t(\"../components/color/attributes\").defaultLine,l=t(\"./array\").isArrayOrTypedArray,c=a(s);function u(t,e){var r=t;return r[3]*=e,r}function f(t){if(n(t))return c;var e=a(t);return e.length?e:c}function h(t){return n(t)?t:1}e.exports={formatColor:function(t,e,r){var n,i,s,p,d,g=t.color,m=l(g),v=l(e),y=o.extractOpts(t),x=[];if(n=void 0!==y.colorscale?o.makeColorScaleFuncFromTrace(t):f,i=m?function(t,e){return void 0===t[e]?c:a(n(t[e]))}:f,s=v?function(t,e){return void 0===t[e]?1:h(t[e])}:h,m||v)for(var b=0;b1?(r*t+r*e)/r:t+e,i=String(n).length;if(i>16){var a=String(e).length;if(i>=String(t).length+a){var o=parseFloat(n).toPrecision(12);-1===o.indexOf(\"e+\")&&(n=+o)}}return n}},{}],778:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"d3-time-format\").utcFormat,a=t(\"fast-isnumeric\"),o=t(\"../constants/numerical\"),s=o.FP_SAFE,l=o.BADNUM,c=e.exports={};c.nestedProperty=t(\"./nested_property\"),c.keyedContainer=t(\"./keyed_container\"),c.relativeAttr=t(\"./relative_attr\"),c.isPlainObject=t(\"./is_plain_object\"),c.toLogRange=t(\"./to_log_range\"),c.relinkPrivateKeys=t(\"./relink_private\");var u=t(\"./array\");c.isTypedArray=u.isTypedArray,c.isArrayOrTypedArray=u.isArrayOrTypedArray,c.isArray1D=u.isArray1D,c.ensureArray=u.ensureArray,c.concat=u.concat,c.maxRowLength=u.maxRowLength,c.minRowLength=u.minRowLength;var f=t(\"./mod\");c.mod=f.mod,c.modHalf=f.modHalf;var h=t(\"./coerce\");c.valObjectMeta=h.valObjectMeta,c.coerce=h.coerce,c.coerce2=h.coerce2,c.coerceFont=h.coerceFont,c.coerceHoverinfo=h.coerceHoverinfo,c.coerceSelectionMarkerOpacity=h.coerceSelectionMarkerOpacity,c.validate=h.validate;var p=t(\"./dates\");c.dateTime2ms=p.dateTime2ms,c.isDateTime=p.isDateTime,c.ms2DateTime=p.ms2DateTime,c.ms2DateTimeLocal=p.ms2DateTimeLocal,c.cleanDate=p.cleanDate,c.isJSDate=p.isJSDate,c.formatDate=p.formatDate,c.incrementMonth=p.incrementMonth,c.dateTick0=p.dateTick0,c.dfltRange=p.dfltRange,c.findExactDates=p.findExactDates,c.MIN_MS=p.MIN_MS,c.MAX_MS=p.MAX_MS;var d=t(\"./search\");c.findBin=d.findBin,c.sorterAsc=d.sorterAsc,c.sorterDes=d.sorterDes,c.distinctVals=d.distinctVals,c.roundUp=d.roundUp,c.sort=d.sort,c.findIndexOfMin=d.findIndexOfMin;var g=t(\"./stats\");c.aggNums=g.aggNums,c.len=g.len,c.mean=g.mean,c.median=g.median,c.midRange=g.midRange,c.variance=g.variance,c.stdev=g.stdev,c.interp=g.interp;var m=t(\"./matrix\");c.init2dArray=m.init2dArray,c.transposeRagged=m.transposeRagged,c.dot=m.dot,c.translationMatrix=m.translationMatrix,c.rotationMatrix=m.rotationMatrix,c.rotationXYMatrix=m.rotationXYMatrix,c.apply3DTransform=m.apply3DTransform,c.apply2DTransform=m.apply2DTransform,c.apply2DTransform2=m.apply2DTransform2,c.convertCssMatrix=m.convertCssMatrix,c.inverseTransformMatrix=m.inverseTransformMatrix;var v=t(\"./angles\");c.deg2rad=v.deg2rad,c.rad2deg=v.rad2deg,c.angleDelta=v.angleDelta,c.angleDist=v.angleDist,c.isFullCircle=v.isFullCircle,c.isAngleInsideSector=v.isAngleInsideSector,c.isPtInsideSector=v.isPtInsideSector,c.pathArc=v.pathArc,c.pathSector=v.pathSector,c.pathAnnulus=v.pathAnnulus;var y=t(\"./anchor_utils\");c.isLeftAnchor=y.isLeftAnchor,c.isCenterAnchor=y.isCenterAnchor,c.isRightAnchor=y.isRightAnchor,c.isTopAnchor=y.isTopAnchor,c.isMiddleAnchor=y.isMiddleAnchor,c.isBottomAnchor=y.isBottomAnchor;var x=t(\"./geometry2d\");c.segmentsIntersect=x.segmentsIntersect,c.segmentDistance=x.segmentDistance,c.getTextLocation=x.getTextLocation,c.clearLocationCache=x.clearLocationCache,c.getVisibleSegment=x.getVisibleSegment,c.findPointOnPath=x.findPointOnPath;var b=t(\"./extend\");c.extendFlat=b.extendFlat,c.extendDeep=b.extendDeep,c.extendDeepAll=b.extendDeepAll,c.extendDeepNoArrays=b.extendDeepNoArrays;var _=t(\"./loggers\");c.log=_.log,c.warn=_.warn,c.error=_.error;var w=t(\"./regex\");c.counterRegex=w.counter;var T=t(\"./throttle\");c.throttle=T.throttle,c.throttleDone=T.done,c.clearThrottle=T.clear;var k=t(\"./dom\");function M(t){var e={};for(var r in t)for(var n=t[r],i=0;is?l:a(t)?Number(t):l:l},c.isIndex=function(t,e){return!(void 0!==e&&t>=e)&&(a(t)&&t>=0&&t%1==0)},c.noop=t(\"./noop\"),c.identity=t(\"./identity\"),c.repeat=function(t,e){for(var r=new Array(e),n=0;nr?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},c.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r},c.simpleMap=function(t,e,r,n,i){for(var a=t.length,o=new Array(a),s=0;s=Math.pow(2,r)?i>10?(c.warn(\"randstr failed uniqueness\"),l):t(e,r,n,(i||0)+1):l},c.OptionControl=function(t,e){t||(t={}),e||(e=\"opt\");var r={optionList:[],_newoption:function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)}};return r[\"_\"+e]=t,r},c.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var r,n,i,a,o=t.length,s=2*o,l=2*e-1,c=new Array(l),u=new Array(o);for(r=0;r=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=o&&(i=s-1-i),a+=t[i]*c[n];u[r]=a}return u},c.syncOrAsync=function(t,e,r){var n;function i(){return c.syncOrAsync(t,e,r)}for(;t.length;)if((n=(0,t.splice(0,1)[0])(e))&&n.then)return n.then(i).then(void 0,c.promiseError);return r&&r(e)},c.stripTrailingSlash=function(t){return\"/\"===t.substr(-1)?t.substr(0,t.length-1):t},c.noneOrAll=function(t,e,r){if(t){var n,i=!1,a=!0;for(n=0;n0?e:0}))},c.fillArray=function(t,e,r,n){if(n=n||c.identity,c.isArrayOrTypedArray(t))for(var i=0;i1?i+o[1]:\"\";if(a&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,\"$1\"+a+\"$2\");return s+l},c.TEMPLATE_STRING_REGEX=/%{([^\\s%{}:]*)([:|\\|][^}]*)?}/g;var I=/^\\w*$/;c.templateString=function(t,e){var r={};return t.replace(c.TEMPLATE_STRING_REGEX,(function(t,n){var i;return I.test(n)?i=e[n]:(r[n]=r[n]||c.nestedProperty(e,n).get,i=r[n]()),c.isValidTextValue(i)?i:\"\"}))};var P={max:10,count:0,name:\"hovertemplate\"};c.hovertemplateString=function(){return D.apply(P,arguments)};var z={max:10,count:0,name:\"texttemplate\"};c.texttemplateString=function(){return D.apply(z,arguments)};var O=/^[:|\\|]/;function D(t,e,r){var a=this,o=arguments;e||(e={});var s={};return t.replace(c.TEMPLATE_STRING_REGEX,(function(t,l,u){var f,h,p,d;for(p=3;p=48&&o<=57,c=s>=48&&s<=57;if(l&&(n=10*n+o-48),c&&(i=10*i+s-48),!l||!c){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n};var R=2e9;c.seedPseudoRandom=function(){R=2e9},c.pseudoRandom=function(){var t=R;return R=(69069*R+1)%4294967296,Math.abs(R-t)<429496729?c.pseudoRandom():R/4294967296},c.fillText=function(t,e,r){var n=Array.isArray(r)?function(t){r.push(t)}:function(t){r.text=t},i=c.extractOption(t,e,\"htx\",\"hovertext\");if(c.isValidTextValue(i))return n(i);var a=c.extractOption(t,e,\"tx\",\"text\");return c.isValidTextValue(a)?n(a):void 0},c.isValidTextValue=function(t){return t||0===t},c.formatPercent=function(t,e){e=e||0;for(var r=(Math.round(100*t*Math.pow(10,e))*Math.pow(.1,e)).toFixed(e)+\"%\",n=0;n1&&(u=1):u=0,c.strTranslate(i-u*(r+o),a-u*(n+s))+c.strScale(u)+(l?\"rotate(\"+l+(e?\"\":\" \"+r+\" \"+n)+\")\":\"\")},c.ensureUniformFontSize=function(t,e){var r=c.extendFlat({},e);return r.size=Math.max(e.size,t._fullLayout.uniformtext.minsize||0),r},c.join2=function(t,e,r){var n=t.length;return n>1?t.slice(0,-1).join(e)+r+t[n-1]:t.join(e)}},{\"../constants/numerical\":753,\"./anchor_utils\":758,\"./angles\":759,\"./array\":760,\"./clean_number\":761,\"./clear_responsive\":763,\"./coerce\":764,\"./dates\":765,\"./dom\":766,\"./extend\":768,\"./filter_unique\":769,\"./filter_visible\":770,\"./geometry2d\":773,\"./identity\":776,\"./increment\":777,\"./is_plain_object\":779,\"./keyed_container\":780,\"./localize\":781,\"./loggers\":782,\"./make_trace_groups\":783,\"./matrix\":784,\"./mod\":785,\"./nested_property\":786,\"./noop\":787,\"./notifier\":788,\"./preserve_drawing_buffer\":792,\"./push_unique\":793,\"./regex\":795,\"./relative_attr\":796,\"./relink_private\":797,\"./search\":798,\"./stats\":801,\"./throttle\":804,\"./to_log_range\":805,d3:169,\"d3-time-format\":166,\"fast-isnumeric\":241}],779:[function(t,e,r){\"use strict\";e.exports=function(t){return window&&window.process&&window.process.versions?\"[object Object]\"===Object.prototype.toString.call(t):\"[object Object]\"===Object.prototype.toString.call(t)&&Object.getPrototypeOf(t)===Object.prototype}},{}],780:[function(t,e,r){\"use strict\";var n=t(\"./nested_property\"),i=/^\\w*$/;e.exports=function(t,e,r,a){var o,s,l;r=r||\"name\",a=a||\"value\";var c={};e&&e.length?(l=n(t,e),s=l.get()):s=t,e=e||\"\";var u={};if(s)for(o=0;o2)return c[e]=2|c[e],h.set(t,null);if(f){for(o=e;o1){var e=[\"LOG:\"];for(t=0;t1){var r=[];for(t=0;t\"),\"long\")}},a.warn=function(){var t;if(n.logging>0){var e=[\"WARN:\"];for(t=0;t0){var r=[];for(t=0;t\"),\"stick\")}},a.error=function(){var t;if(n.logging>0){var e=[\"ERROR:\"];for(t=0;t0){var r=[];for(t=0;t\"),\"stick\")}}},{\"../plot_api/plot_config\":815,\"./notifier\":788}],783:[function(t,e,r){\"use strict\";var n=t(\"d3\");e.exports=function(t,e,r){var i=t.selectAll(\"g.\"+r.replace(/\\s/g,\".\")).data(e,(function(t){return t[0].trace.uid}));i.exit().remove(),i.enter().append(\"g\").attr(\"class\",r),i.order();var a=t.classed(\"rangeplot\")?\"nodeRangePlot3\":\"node3\";return i.each((function(t){t[0][a]=n.select(this)})),i}},{d3:169}],784:[function(t,e,r){\"use strict\";var n=t(\"gl-mat4\");r.init2dArray=function(t,e){for(var r=new Array(t),n=0;ne/2?t-Math.round(t/e)*e:t}}},{}],786:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"./array\").isArrayOrTypedArray;function a(t,e){return function(){var r,n,o,s,l,c=t;for(s=0;s/g),l=0;la||c===i||cs)&&(!e||!l(t))}:function(t,e){var l=t[0],c=t[1];if(l===i||la||c===i||cs)return!1;var u,f,h,p,d,g=r.length,m=r[0][0],v=r[0][1],y=0;for(u=1;uMath.max(f,m)||c>Math.max(h,v)))if(cu||Math.abs(n(o,h))>i)return!0;return!1},a.filter=function(t,e){var r=[t[0]],n=0,i=0;function o(o){t.push(o);var s=r.length,l=n;r.splice(i+1);for(var c=l+1;c1&&o(t.pop());return{addPt:o,raw:t,filtered:r}}},{\"../constants/numerical\":753,\"./matrix\":784}],791:[function(t,e,r){(function(r){(function(){\"use strict\";var n=t(\"./show_no_webgl_msg\"),i=t(\"regl\");e.exports=function(t,e){var a=t._fullLayout,o=!0;return a._glcanvas.each((function(n){if(!n.regl&&(!n.pick||a._has(\"parcoords\"))){try{n.regl=i({canvas:this,attributes:{antialias:!n.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||r.devicePixelRatio,extensions:e||[]})}catch(t){o=!1}n.regl||(o=!1),o&&this.addEventListener(\"webglcontextlost\",(function(e){t&&t.emit&&t.emit(\"plotly_webglcontextlost\",{event:e,layer:n.key})}),!1)}})),o||n({container:a._glcontainer.node()}),o}}).call(this)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"./show_no_webgl_msg\":800,regl:540}],792:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"is-mobile\");e.exports=function(t){var e;if(\"string\"!=typeof(e=t&&t.hasOwnProperty(\"userAgent\")?t.userAgent:function(){var t;\"undefined\"!=typeof navigator&&(t=navigator.userAgent);t&&t.headers&&\"string\"==typeof t.headers[\"user-agent\"]&&(t=t.headers[\"user-agent\"]);return t}()))return!0;var r=i({ua:{headers:{\"user-agent\":e}},tablet:!0,featureDetect:!1});if(!r)for(var a=e.split(\" \"),o=1;o-1;s--){var l=a[s];if(\"Version/\"===l.substr(0,8)){var c=l.substr(8).split(\".\")[0];if(n(c)&&(c=+c),c>=13)return!0}}}return r}},{\"fast-isnumeric\":241,\"is-mobile\":467}],793:[function(t,e,r){\"use strict\";e.exports=function(t,e){if(e instanceof RegExp){for(var r=e.toString(),n=0;ni.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--))},startSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},stopSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},undo:function(t){var e,r;if(t.framework&&t.framework.isPolar)t.framework.undo();else if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;re}function u(t,e){return t>=e}r.findBin=function(t,e,r){if(n(e.start))return r?Math.ceil((t-e.start)/e.size-1e-9)-1:Math.floor((t-e.start)/e.size+1e-9);var a,o,f=0,h=e.length,p=0,d=h>1?(e[h-1]-e[0])/(h-1):1;for(o=d>=0?r?s:l:r?u:c,t+=1e-9*d*(r?-1:1)*(d>=0?1:-1);f90&&i.log(\"Long binary search...\"),f-1},r.sorterAsc=function(t,e){return t-e},r.sorterDes=function(t,e){return e-t},r.distinctVals=function(t,e){var n,i=(e||{}).unitMinDiff,a=t.slice();for(a.sort(r.sorterAsc),n=a.length-1;n>-1&&a[n]===o;n--);var s=1;i||(s=a[n]-a[0]||1);for(var l,c=s/(n||1)/1e4,u=[],f=0;f<=n;f++){var h=a[f],p=h-l;void 0===l?(u.push(h),l=h):p>c&&(s=Math.min(s,p),u.push(h),l=h)}return{vals:u,minDiff:s}},r.roundUp=function(t,e,r){for(var n,i=0,a=e.length-1,o=0,s=r?0:1,l=r?1:0,c=r?Math.ceil:Math.floor;i0&&(n=1),r&&n)return t.sort(e)}return n?t:t.reverse()},r.findIndexOfMin=function(t,e){e=e||a;for(var r,n=1/0,i=0;ia.length)&&(o=a.length),n(e)||(e=!1),i(a[0])){for(l=new Array(o),s=0;st.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},{\"./array\":760,\"fast-isnumeric\":241}],802:[function(t,e,r){\"use strict\";var n=t(\"color-normalize\");e.exports=function(t){return t?n(t):[0,0,0,1]}},{\"color-normalize\":125}],803:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../lib\"),a=i.strTranslate,o=t(\"../constants/xmlns_namespaces\"),s=t(\"../constants/alignment\").LINE_SPACING;function l(t,e){return t.node().getBoundingClientRect()[e]}var c=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;r.convertToTspans=function(t,e,A){var S=t.text(),C=!t.attr(\"data-notex\")&&\"undefined\"!=typeof MathJax&&S.match(c),L=n.select(t.node().parentNode);if(!L.empty()){var I=t.attr(\"class\")?t.attr(\"class\").split(\" \")[0]:\"text\";return I+=\"-math\",L.selectAll(\"svg.\"+I).remove(),L.selectAll(\"g.\"+I+\"-group\").remove(),t.style(\"display\",null).attr({\"data-unformatted\":S,\"data-math\":\"N\"}),C?(e&&e._promises||[]).push(new Promise((function(e){t.style(\"display\",\"none\");var r=parseInt(t.node().style.fontSize,10),o={fontSize:r};!function(t,e,r){var a,o,s,l;MathJax.Hub.Queue((function(){return o=i.extendDeepAll({},MathJax.Hub.config),s=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:\"none\",tex2jax:{inlineMath:[[\"$\",\"$\"],[\"\\\\(\",\"\\\\)\"]]},displayAlign:\"left\"})}),(function(){if(\"SVG\"!==(a=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer(\"SVG\")}),(function(){var r=\"math-output-\"+i.randstr({},64);return l=n.select(\"body\").append(\"div\").attr({id:r}).style({visibility:\"hidden\",position:\"absolute\"}).style({\"font-size\":e.fontSize+\"px\"}).text(t.replace(u,\"\\\\lt \").replace(f,\"\\\\gt \")),MathJax.Hub.Typeset(l.node())}),(function(){var e=n.select(\"body\").select(\"#MathJax_SVG_glyphs\");if(l.select(\".MathJax_SVG\").empty()||!l.select(\"svg\").node())i.log(\"There was an error in the tex syntax.\",t),r();else{var o=l.select(\"svg\").node().getBoundingClientRect();r(l.select(\".MathJax_SVG\"),e,o)}if(l.remove(),\"SVG\"!==a)return MathJax.Hub.setRenderer(a)}),(function(){return void 0!==s&&(MathJax.Hub.processSectionDelay=s),MathJax.Hub.Config(o)}))}(C[2],o,(function(n,i,o){L.selectAll(\"svg.\"+I).remove(),L.selectAll(\"g.\"+I+\"-group\").remove();var s=n&&n.select(\"svg\");if(!s||!s.node())return P(),void e();var c=L.append(\"g\").classed(I+\"-group\",!0).attr({\"pointer-events\":\"none\",\"data-unformatted\":S,\"data-math\":\"Y\"});c.node().appendChild(s.node()),i&&i.node()&&s.node().insertBefore(i.node().cloneNode(!0),s.node().firstChild),s.attr({class:I,height:o.height,preserveAspectRatio:\"xMinYMin meet\"}).style({overflow:\"visible\",\"pointer-events\":\"none\"});var u=t.node().style.fill||\"black\",f=s.select(\"g\");f.attr({fill:u,stroke:u});var h=l(f,\"width\"),p=l(f,\"height\"),d=+t.attr(\"x\")-h*{start:0,middle:.5,end:1}[t.attr(\"text-anchor\")||\"start\"],g=-(r||l(t,\"height\"))/4;\"y\"===I[0]?(c.attr({transform:\"rotate(\"+[-90,+t.attr(\"x\"),+t.attr(\"y\")]+\")\"+a(-h/2,g-p/2)}),s.attr({x:+t.attr(\"x\"),y:+t.attr(\"y\")})):\"l\"===I[0]?s.attr({x:t.attr(\"x\"),y:g-p/2}):\"a\"===I[0]&&0!==I.indexOf(\"atitle\")?s.attr({x:0,y:g}):s.attr({x:d,y:+t.attr(\"y\")+g-p/2}),A&&A.call(t,c),e(c)}))}))):P(),t}function P(){L.empty()||(I=t.attr(\"class\")+\"-math\",L.select(\"svg.\"+I).remove()),t.text(\"\").style(\"white-space\",\"pre\"),function(t,e){e=e.replace(m,\" \");var r,a=!1,l=[],c=-1;function u(){c++;var e=document.createElementNS(o.svg,\"tspan\");n.select(e).attr({class:\"line\",dy:c*s+\"em\"}),t.appendChild(e),r=e;var i=l;if(l=[{node:e}],i.length>1)for(var a=1;a doesnt match end tag <\"+t+\">. Pretending it did match.\",e),r=l[l.length-1].node}else i.log(\"Ignoring unexpected end tag .\",e)}x.test(e)?u():(r=t,l=[{node:t}]);for(var C=e.split(v),L=0;L|>|>)/g;var h={sup:\"font-size:70%\",sub:\"font-size:70%\",b:\"font-weight:bold\",i:\"font-style:italic\",a:\"cursor:pointer\",span:\"\",em:\"font-style:italic;font-weight:bold\"},p={sub:\"0.3em\",sup:\"-0.6em\"},d={sub:\"-0.21em\",sup:\"0.42em\"},g=[\"http:\",\"https:\",\"mailto:\",\"\",void 0,\":\"],m=r.NEWLINES=/(\\r\\n?|\\n)/g,v=/(<[^<>]*>)/,y=/<(\\/?)([^ >]*)(\\s+(.*))?>/i,x=//i;r.BR_TAG_ALL=//gi;var b=/(^|[\\s\"'])style\\s*=\\s*(\"([^\"]*);?\"|'([^']*);?')/i,_=/(^|[\\s\"'])href\\s*=\\s*(\"([^\"]*)\"|'([^']*)')/i,w=/(^|[\\s\"'])target\\s*=\\s*(\"([^\"\\s]*)\"|'([^'\\s]*)')/i,T=/(^|[\\s\"'])popup\\s*=\\s*(\"([\\w=,]*)\"|'([\\w=,]*)')/i;function k(t,e){if(!t)return null;var r=t.match(e),n=r&&(r[3]||r[4]);return n&&E(n)}var M=/(^|;)\\s*color:/;r.plainText=function(t,e){for(var r=void 0!==(e=e||{}).len&&-1!==e.len?e.len:1/0,n=void 0!==e.allowedTags?e.allowedTags:[\"br\"],i=\"...\".length,a=t.split(v),o=[],s=\"\",l=0,c=0;ci?o.push(u.substr(0,d-i)+\"...\"):o.push(u.substr(0,d));break}s=\"\"}}return o.join(\"\")};var A={mu:\"\\u03bc\",amp:\"&\",lt:\"<\",gt:\">\",nbsp:\"\\xa0\",times:\"\\xd7\",plusmn:\"\\xb1\",deg:\"\\xb0\"},S=/&(#\\d+|#x[\\da-fA-F]+|[a-z]+);/g;function E(t){return t.replace(S,(function(t,e){return(\"#\"===e.charAt(0)?function(t){if(t>1114111)return;var e=String.fromCodePoint;if(e)return e(t);var r=String.fromCharCode;return t<=65535?r(t):r(55232+(t>>10),t%1024+56320)}(\"x\"===e.charAt(1)?parseInt(e.substr(2),16):parseInt(e.substr(1),10)):A[e])||t}))}function C(t,e,r){var n,a,o,s=r.horizontalAlign,l=r.verticalAlign||\"top\",c=t.node().getBoundingClientRect(),u=e.node().getBoundingClientRect();return a=\"bottom\"===l?function(){return c.bottom-n.height}:\"middle\"===l?function(){return c.top+(c.height-n.height)/2}:function(){return c.top},o=\"right\"===s?function(){return c.right-n.width}:\"center\"===s?function(){return c.left+(c.width-n.width)/2}:function(){return c.left},function(){n=this.node().getBoundingClientRect();var t=o()-u.left,e=a()-u.top,s=r.gd||{};if(r.gd){s._fullLayout._calcInverseTransform(s);var l=i.apply3DTransform(s._fullLayout._invTransform)(t,e);t=l[0],e=l[1]}return this.style({top:e+\"px\",left:t+\"px\",\"z-index\":1e3}),this}}r.convertEntities=E,r.sanitizeHTML=function(t){t=t.replace(m,\" \");for(var e=document.createElement(\"p\"),r=e,i=[],a=t.split(v),o=0;oa.ts+e?l():a.timer=setTimeout((function(){l(),a.timer=null}),e)},r.done=function(t){var e=n[t];return e&&e.timer?new Promise((function(t){var r=e.onDone;e.onDone=function(){r&&r(),t(),e.onDone=null}})):Promise.resolve()},r.clear=function(t){if(t)i(n[t]),delete n[t];else for(var e in n)r.clear(e)}},{}],805:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\");e.exports=function(t,e){if(t>0)return Math.log(t)/Math.LN10;var r=Math.log(Math.min(e[0],e[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(e[0],e[1]))/Math.LN10-6),r}},{\"fast-isnumeric\":241}],806:[function(t,e,r){\"use strict\";var n=e.exports={},i=t(\"../plots/geo/constants\").locationmodeToLayer,a=t(\"topojson-client\").feature;n.getTopojsonName=function(t){return[t.scope.replace(/ /g,\"-\"),\"_\",t.resolution.toString(),\"m\"].join(\"\")},n.getTopojsonPath=function(t,e){return t+e+\".json\"},n.getTopojsonFeatures=function(t,e){var r=i[t.locationmode],n=e.objects[r];return a(e,n).features}},{\"../plots/geo/constants\":858,\"topojson-client\":579}],807:[function(t,e,r){\"use strict\";e.exports={moduleType:\"locale\",name:\"en-US\",dictionary:{\"Click to enter Colorscale title\":\"Click to enter Colorscale title\"},format:{date:\"%m/%d/%Y\"}}},{}],808:[function(t,e,r){\"use strict\";e.exports={moduleType:\"locale\",name:\"en\",dictionary:{\"Click to enter Colorscale title\":\"Click to enter Colourscale title\"},format:{days:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],shortDays:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],months:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],shortMonths:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],periods:[\"AM\",\"PM\"],dateTime:\"%a %b %e %X %Y\",date:\"%d/%m/%Y\",time:\"%H:%M:%S\",decimal:\".\",thousands:\",\",grouping:[3],currency:[\"$\",\"\"],year:\"%Y\",month:\"%b %Y\",dayMonth:\"%b %-d\",dayMonthYear:\"%b %-d, %Y\"}}},{}],809:[function(t,e,r){\"use strict\";var n=t(\"../registry\");e.exports=function(t){for(var e,r,i=n.layoutArrayContainers,a=n.layoutArrayRegexes,o=t.split(\"[\")[0],s=0;s0&&o.log(\"Clearing previous rejected promises from queue.\"),t._promises=[]},r.cleanLayout=function(t){var e,n;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var a=(s.subplotsRegistry.cartesian||{}).attrRegex,l=(s.subplotsRegistry.polar||{}).attrRegex,f=(s.subplotsRegistry.ternary||{}).attrRegex,h=(s.subplotsRegistry.gl3d||{}).attrRegex,g=Object.keys(t);for(e=0;e3?(z.x=1.02,z.xanchor=\"left\"):z.x<-2&&(z.x=-.02,z.xanchor=\"right\"),z.y>3?(z.y=1.02,z.yanchor=\"bottom\"):z.y<-2&&(z.y=-.02,z.yanchor=\"top\")),d(t),\"rotate\"===t.dragmode&&(t.dragmode=\"orbit\"),c.clean(t),t.template&&t.template.layout&&r.cleanLayout(t.template.layout),t},r.cleanData=function(t){for(var e=0;e0)return t.substr(0,e)}r.hasParent=function(t,e){for(var r=b(e);r;){if(r in t)return!0;r=b(r)}return!1};var _=[\"x\",\"y\",\"z\"];r.clearAxisTypes=function(t,e,r){for(var n=0;n1&&a.warn(\"Full array edits are incompatible with other edits\",f);var y=r[\"\"][\"\"];if(c(y))e.set(null);else{if(!Array.isArray(y))return a.warn(\"Unrecognized full array edit value\",f,y),!0;e.set(y)}return!g&&(h(m,v),p(t),!0)}var x,b,_,w,T,k,M,A,S=Object.keys(r).map(Number).sort(o),E=e.get(),C=E||[],L=u(v,f).get(),I=[],P=-1,z=C.length;for(x=0;xC.length-(M?0:1))a.warn(\"index out of range\",f,_);else if(void 0!==k)T.length>1&&a.warn(\"Insertion & removal are incompatible with edits to the same index.\",f,_),c(k)?I.push(_):M?(\"add\"===k&&(k={}),C.splice(_,0,k),L&&L.splice(_,0,{})):a.warn(\"Unrecognized full object edit value\",f,_,k),-1===P&&(P=_);else for(b=0;b=0;x--)C.splice(I[x],1),L&&L.splice(I[x],1);if(C.length?E||e.set(C):e.set(null),g)return!1;if(h(m,v),d!==i){var O;if(-1===P)O=S;else{for(z=Math.max(C.length,z),O=[],x=0;x=P);x++)O.push(_);for(x=P;x=t.data.length||i<-t.data.length)throw new Error(r+\" must be valid indices for gd.data.\");if(e.indexOf(i,n+1)>-1||i>=0&&e.indexOf(-t.data.length+i)>-1||i<0&&e.indexOf(t.data.length+i)>-1)throw new Error(\"each index in \"+r+\" must be unique.\")}}function O(t,e,r){if(!Array.isArray(t.data))throw new Error(\"gd.data must be an array.\");if(\"undefined\"==typeof e)throw new Error(\"currentIndices is a required argument.\");if(Array.isArray(e)||(e=[e]),z(t,e,\"currentIndices\"),\"undefined\"==typeof r||Array.isArray(r)||(r=[r]),\"undefined\"!=typeof r&&z(t,r,\"newIndices\"),\"undefined\"!=typeof r&&e.length!==r.length)throw new Error(\"current and new indices must be of equal length.\")}function D(t,e,r,n,a){!function(t,e,r,n){var i=o.isPlainObject(n);if(!Array.isArray(t.data))throw new Error(\"gd.data must be an array\");if(!o.isPlainObject(e))throw new Error(\"update must be a key:value object\");if(\"undefined\"==typeof r)throw new Error(\"indices must be an integer or array of integers\");for(var a in z(t,r,\"indices\"),e){if(!Array.isArray(e[a])||e[a].length!==r.length)throw new Error(\"attribute \"+a+\" must be an array of length equal to indices array length\");if(i&&(!(a in n)||!Array.isArray(n[a])||n[a].length!==e[a].length))throw new Error(\"when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object\")}}(t,e,r,n);for(var l=function(t,e,r,n){var a,l,c,u,f,h=o.isPlainObject(n),p=[];for(var d in Array.isArray(r)||(r=[r]),r=P(r,t.data.length-1),e)for(var g=0;g-1?l(r,r.replace(\"titlefont\",\"title.font\")):r.indexOf(\"titleposition\")>-1?l(r,r.replace(\"titleposition\",\"title.position\")):r.indexOf(\"titleside\")>-1?l(r,r.replace(\"titleside\",\"title.side\")):r.indexOf(\"titleoffset\")>-1&&l(r,r.replace(\"titleoffset\",\"title.offset\")):l(r,r.replace(\"title\",\"title.text\"));function l(e,r){t[r]=t[e],delete t[e]}}function q(t,e,r){if(t=o.getGraphDiv(t),T.clearPromiseQueue(t),t.framework&&t.framework.isPolar)return Promise.resolve(t);var n={};if(\"string\"==typeof e)n[e]=r;else{if(!o.isPlainObject(e))return o.warn(\"Relayout fail.\",e,r),Promise.reject();n=o.extendFlat({},e)}Object.keys(n).length&&(t.changed=!0);var i=Z(t,n),a=i.flags;a.calc&&(t.calcdata=void 0);var s=[h.previousPromises];a.layoutReplot?s.push(k.layoutReplot):Object.keys(n).length&&(H(t,a,i)||h.supplyDefaults(t),a.legend&&s.push(k.doLegend),a.layoutstyle&&s.push(k.layoutStyles),a.axrange&&G(s,i.rangesAltered),a.ticks&&s.push(k.doTicksRelayout),a.modebar&&s.push(k.doModeBar),a.camera&&s.push(k.doCamera),a.colorbars&&s.push(k.doColorBars),s.push(E)),s.push(h.rehover,h.redrag),c.add(t,q,[t,i.undoit],q,[t,i.redoit]);var l=o.syncOrAsync(s,t);return l&&l.then||(l=Promise.resolve(t)),l.then((function(){return t.emit(\"plotly_relayout\",i.eventData),t}))}function H(t,e,r){var n=t._fullLayout;if(!e.axrange)return!1;for(var i in e)if(\"axrange\"!==i&&e[i])return!1;for(var a in r.rangesAltered){var o=d.id2name(a),s=t.layout[o],l=n[o];if(l.autorange=s.autorange,s.range&&(l.range=s.range.slice()),l.cleanRange(),l._matchGroup)for(var c in l._matchGroup)if(c!==a){var u=n[d.id2name(c)];u.autorange=l.autorange,u.range=l.range.slice(),u._input.range=l.range.slice()}}return!0}function G(t,e){var r=e?function(t){var r=[],n=!0;for(var i in e){var a=d.getFromId(t,i);if(r.push(i),-1!==(a.ticklabelposition||\"\").indexOf(\"inside\")&&a._anchorAxis&&r.push(a._anchorAxis._id),a._matchGroup)for(var o in a._matchGroup)e[o]||r.push(o);a.automargin&&(n=!1)}return d.draw(t,r,{skipTitle:n})}:function(t){return d.draw(t,\"redraw\")};t.push(b,k.doAutoRangeAndConstraints,r,k.drawData,k.finalDraw)}var Y=/^[xyz]axis[0-9]*\\.range(\\[[0|1]\\])?$/,W=/^[xyz]axis[0-9]*\\.autorange$/,X=/^[xyz]axis[0-9]*\\.domain(\\[[0|1]\\])?$/;function Z(t,e){var r,n,i,a=t.layout,l=t._fullLayout,c=l._guiEditing,h=N(l._preGUI,c),p=Object.keys(e),g=d.list(t),m=o.extendDeepAll({},e),v={};for(V(e),p=Object.keys(e),n=0;n0&&\"string\"!=typeof z.parts[D];)D--;var R=z.parts[D],F=z.parts[D-1]+\".\"+R,j=z.parts.slice(0,D).join(\".\"),U=s(t.layout,j).get(),q=s(l,j).get(),H=z.get();if(void 0!==O){k[P]=O,S[P]=\"reverse\"===R?O:B(H);var G=f.getLayoutValObject(l,z.parts);if(G&&G.impliedEdits&&null!==O)for(var Z in G.impliedEdits)E(o.relativeAttr(P,Z),G.impliedEdits[Z]);if(-1!==[\"width\",\"height\"].indexOf(P))if(O){E(\"autosize\",null);var K=\"height\"===P?\"width\":\"height\";E(K,l[K])}else l[P]=t._initialAutoSize[P];else if(\"autosize\"===P)E(\"width\",O?null:l.width),E(\"height\",O?null:l.height);else if(F.match(Y))I(F),s(l,j+\"._inputRange\").set(null);else if(F.match(W)){I(F),s(l,j+\"._inputRange\").set(null);var Q=s(l,j).get();Q._inputDomain&&(Q._input.domain=Q._inputDomain.slice())}else F.match(X)&&s(l,j+\"._inputDomain\").set(null);if(\"type\"===R){C=U;var $=\"linear\"===q.type&&\"log\"===O,tt=\"log\"===q.type&&\"linear\"===O;if($||tt){if(C&&C.range)if(q.autorange)$&&(C.range=C.range[1]>C.range[0]?[1,2]:[2,1]);else{var et=C.range[0],rt=C.range[1];$?(et<=0&&rt<=0&&E(j+\".autorange\",!0),et<=0?et=rt/1e6:rt<=0&&(rt=et/1e6),E(j+\".range[0]\",Math.log(et)/Math.LN10),E(j+\".range[1]\",Math.log(rt)/Math.LN10)):(E(j+\".range[0]\",Math.pow(10,et)),E(j+\".range[1]\",Math.pow(10,rt)))}else E(j+\".autorange\",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[z.parts[0]]&&\"radialaxis\"===z.parts[1]&&delete l[z.parts[0]]._subplot.viewInitial[\"radialaxis.range\"],u.getComponentMethod(\"annotations\",\"convertCoords\")(t,q,O,E),u.getComponentMethod(\"images\",\"convertCoords\")(t,q,O,E)}else E(j+\".autorange\",!0),E(j+\".range\",null);s(l,j+\"._inputRange\").set(null)}else if(R.match(A)){var nt=s(l,P).get(),it=(O||{}).type;it&&\"-\"!==it||(it=\"linear\"),u.getComponentMethod(\"annotations\",\"convertCoords\")(t,nt,it,E),u.getComponentMethod(\"images\",\"convertCoords\")(t,nt,it,E)}var at=w.containerArrayMatch(P);if(at){r=at.array,n=at.index;var ot=at.property,st=G||{editType:\"calc\"};\"\"!==n&&\"\"===ot&&(w.isAddVal(O)?S[P]=null:w.isRemoveVal(O)?S[P]=(s(a,r).get()||[])[n]:o.warn(\"unrecognized full object value\",e)),M.update(_,st),v[r]||(v[r]={});var lt=v[r][n];lt||(lt=v[r][n]={}),lt[ot]=O,delete e[P]}else\"reverse\"===R?(U.range?U.range.reverse():(E(j+\".autorange\",!0),U.range=[1,0]),q.autorange?_.calc=!0:_.plot=!0):(l._has(\"scatter-like\")&&l._has(\"regl\")&&\"dragmode\"===P&&(\"lasso\"===O||\"select\"===O)&&\"lasso\"!==H&&\"select\"!==H||l._has(\"gl2d\")?_.plot=!0:G?M.update(_,G):_.calc=!0,z.set(O))}}for(r in v){w.applyContainerArrayChanges(t,h(a,r),v[r],_,h)||(_.plot=!0)}for(var ct in L){var ut=(C=d.getFromId(t,ct))&&C._constraintGroup;if(ut)for(var ft in _.calc=!0,ut)L[ft]||(d.getFromId(t,ft)._constraintShrinkable=!0)}return(J(t)||e.height||e.width)&&(_.plot=!0),(_.plot||_.calc)&&(_.layoutReplot=!0),{flags:_,rangesAltered:L,undoit:S,redoit:k,eventData:m}}function J(t){var e=t._fullLayout,r=e.width,n=e.height;return t.layout.autosize&&h.plotAutoSize(t,t.layout,e),e.width!==r||e.height!==n}function K(t,e,n,i){if(t=o.getGraphDiv(t),T.clearPromiseQueue(t),t.framework&&t.framework.isPolar)return Promise.resolve(t);o.isPlainObject(e)||(e={}),o.isPlainObject(n)||(n={}),Object.keys(e).length&&(t.changed=!0),Object.keys(n).length&&(t.changed=!0);var a=T.coerceTraceIndices(t,i),s=U(t,o.extendFlat({},e),a),l=s.flags,u=Z(t,o.extendFlat({},n)),f=u.flags;(l.calc||f.calc)&&(t.calcdata=void 0),l.clearAxisTypes&&T.clearAxisTypes(t,a,n);var p=[];f.layoutReplot?p.push(k.layoutReplot):l.fullReplot?p.push(r.plot):(p.push(h.previousPromises),H(t,f,u)||h.supplyDefaults(t),l.style&&p.push(k.doTraceStyle),(l.colorbars||f.colorbars)&&p.push(k.doColorBars),f.legend&&p.push(k.doLegend),f.layoutstyle&&p.push(k.layoutStyles),f.axrange&&G(p,u.rangesAltered),f.ticks&&p.push(k.doTicksRelayout),f.modebar&&p.push(k.doModeBar),f.camera&&p.push(k.doCamera),p.push(E)),p.push(h.rehover,h.redrag),c.add(t,K,[t,s.undoit,u.undoit,s.traces],K,[t,s.redoit,u.redoit,s.traces]);var d=o.syncOrAsync(p,t);return d&&d.then||(d=Promise.resolve(t)),d.then((function(){return t.emit(\"plotly_update\",{data:s.eventData,layout:u.eventData}),t}))}function Q(t){return function(e){e._fullLayout._guiEditing=!0;var r=t.apply(null,arguments);return e._fullLayout._guiEditing=!1,r}}var $=[{pattern:/^hiddenlabels/,attr:\"legend.uirevision\"},{pattern:/^((x|y)axis\\d*)\\.((auto)?range|title\\.text)/},{pattern:/axis\\d*\\.showspikes$/,attr:\"modebar.uirevision\"},{pattern:/(hover|drag)mode$/,attr:\"modebar.uirevision\"},{pattern:/^(scene\\d*)\\.camera/},{pattern:/^(geo\\d*)\\.(projection|center|fitbounds)/},{pattern:/^(ternary\\d*\\.[abc]axis)\\.(min|title\\.text)$/},{pattern:/^(polar\\d*\\.radialaxis)\\.((auto)?range|angle|title\\.text)/},{pattern:/^(polar\\d*\\.angularaxis)\\.rotation/},{pattern:/^(mapbox\\d*)\\.(center|zoom|bearing|pitch)/},{pattern:/^legend\\.(x|y)$/,attr:\"editrevision\"},{pattern:/^(shapes|annotations)/,attr:\"editrevision\"},{pattern:/^title\\.text$/,attr:\"editrevision\"}],tt=[{pattern:/^selectedpoints$/,attr:\"selectionrevision\"},{pattern:/(^|value\\.)visible$/,attr:\"legend.uirevision\"},{pattern:/^dimensions\\[\\d+\\]\\.constraintrange/},{pattern:/^node\\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\\.)name$/},{pattern:/colorbar\\.title\\.text$/},{pattern:/colorbar\\.(x|y)$/,attr:\"editrevision\"}];function et(t,e){for(var r=0;r1;)if(n.pop(),void 0!==(r=s(e,n.join(\".\")+\".uirevision\").get()))return r;return e.uirevision}function nt(t,e){for(var r=0;r=i.length?i[0]:i[t]:i}function l(t){return Array.isArray(a)?t>=a.length?a[0]:a[t]:a}function c(t,e){var r=0;return function(){if(t&&++r===e)return t()}}return void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise((function(a,u){function f(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var e=n._currentFrame=n._frameQueue.shift();if(e){var r=e.name?e.name.toString():null;t._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=e.frameOpts.duration,h.transition(t,e.frame.data,e.frame.layout,T.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then((function(){e.onComplete&&e.onComplete()})),t.emit(\"plotly_animatingframe\",{name:r,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else t.emit(\"plotly_animated\"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}function p(){t.emit(\"plotly_animating\"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var e=function(){n._animationRaf=window.requestAnimationFrame(e),Date.now()-n._lastFrameAt>n._timeToNext&&f()};e()}var d,g,m=0;function v(t){return Array.isArray(i)?m>=i.length?t.transitionOpts=i[m]:t.transitionOpts=i[0]:t.transitionOpts=i,m++,t}var y=[],x=null==e,b=Array.isArray(e);if(!x&&!b&&o.isPlainObject(e))y.push({type:\"object\",data:v(o.extendFlat({},e))});else if(x||-1!==[\"string\",\"number\"].indexOf(typeof e))for(d=0;d0&&kk)&&M.push(g);y=M}}y.length>0?function(e){if(0!==e.length){for(var i=0;i=0;n--)if(o.isPlainObject(e[n])){var g=e[n].name,m=(u[g]||d[g]||{}).name,v=e[n].name,y=u[m]||d[m];m&&v&&\"number\"==typeof v&&y&&S<5&&(S++,o.warn('addFrames: overwriting frame \"'+(u[m]||d[m]).name+'\" with a frame whose name of type \"number\" also equates to \"'+m+'\". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===S&&o.warn(\"addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.\")),d[g]={name:g},p.push({frame:h.supplyFrameDefaults(e[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:f+n})}p.sort((function(t,e){return t.index>e.index?-1:t.index=0;n--){if(\"number\"==typeof(i=p[n].frame).name&&o.warn(\"Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings\"),!i.name)for(;u[i.name=\"frame \"+t._transitionData._counter++];);if(u[i.name]){for(a=0;a=0;r--)n=e[r],a.push({type:\"delete\",index:n}),s.unshift({type:\"insert\",index:n,value:i[n]});var l=h.modifyFrames,u=h.modifyFrames,f=[t,s],p=[t,a];return c&&c.add(t,l,f,u,p),h.modifyFrames(t,a)},r.addTraces=function t(e,n,i){e=o.getGraphDiv(e);var a,s,l=[],u=r.deleteTraces,f=t,h=[e,l],p=[e,n];for(function(t,e,r){var n,i;if(!Array.isArray(t.data))throw new Error(\"gd.data must be an array.\");if(\"undefined\"==typeof e)throw new Error(\"traces must be defined.\");for(Array.isArray(e)||(e=[e]),n=0;n=0&&r=0&&r=a.length)return!1;if(2===t.dimensions){if(r++,e.length===r)return t;var o=e[r];if(!_(o))return!1;t=a[i][o]}else t=a[i]}else t=a}}return t}function _(t){return t===Math.round(t)&&t>=0}function w(){var t,e,r={};for(t in d(r,o),n.subplotsRegistry){if((e=n.subplotsRegistry[t]).layoutAttributes)if(Array.isArray(e.attr))for(var i=0;i=l.length)return!1;i=(r=(n.transformsRegistry[l[c].type]||{}).attributes)&&r[e[2]],s=3}else if(\"area\"===t.type)i=u[o];else{var f=t._module;if(f||(f=(n.modules[t.type||a.type.dflt]||{})._module),!f)return!1;if(!(i=(r=f.attributes)&&r[o])){var h=f.basePlotModule;h&&h.attributes&&(i=h.attributes[o])}i||(i=a[o])}return b(i,e,s)},r.getLayoutValObject=function(t,e){return b(function(t,e){var r,i,a,s,l=t._basePlotModules;if(l){var c;for(r=0;r=i&&(r._input||{})._templateitemname;o&&(a=i);var s,l=e+\"[\"+a+\"]\";function c(){s={},o&&(s[l]={},s[l].templateitemname=o)}function u(t,e){o?n.nestedProperty(s[l],t).set(e):s[l+\".\"+t]=e}function f(){var t=s;return c(),t}return c(),{modifyBase:function(t,e){s[t]=e},modifyItem:u,getUpdateObj:f,applyUpdate:function(e,r){e&&u(e,r);var i=f();for(var a in i)n.nestedProperty(t,a).set(i[a])}}}},{\"../lib\":778,\"../plots/attributes\":824}],818:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../registry\"),a=t(\"../plots/plots\"),o=t(\"../lib\"),s=t(\"../lib/clear_gl_canvases\"),l=t(\"../components/color\"),c=t(\"../components/drawing\"),u=t(\"../components/titles\"),f=t(\"../components/modebar\"),h=t(\"../plots/cartesian/axes\"),p=t(\"../constants/alignment\"),d=t(\"../plots/cartesian/constraints\"),g=d.enforce,m=d.clean,v=t(\"../plots/cartesian/autorange\").doAutoRange;function y(t,e,r){for(var n=0;n=t[1]||i[1]<=t[0])&&(a[0]e[0]))return!0}return!1}function x(t){var e,i,s,u,d,g,m=t._fullLayout,v=m._size,x=v.p,_=h.list(t,\"\",!0);if(m._paperdiv.style({width:t._context.responsive&&m.autosize&&!t._context._hasZeroWidth&&!t.layout.width?\"100%\":m.width+\"px\",height:t._context.responsive&&m.autosize&&!t._context._hasZeroHeight&&!t.layout.height?\"100%\":m.height+\"px\"}).selectAll(\".main-svg\").call(c.setSize,m.width,m.height),t._context.setBackground(t,m.paper_bgcolor),r.drawMainTitle(t),f.manage(t),!m._has(\"cartesian\"))return a.previousPromises(t);function T(t,e,r){var n=t._lw/2;return\"x\"===t._id.charAt(0)?e?\"top\"===r?e._offset-x-n:e._offset+e._length+x+n:v.t+v.h*(1-(t.position||0))+n%1:e?\"right\"===r?e._offset+e._length+x+n:e._offset-x-n:v.l+v.w*(t.position||0)+n%1}for(e=0;e<_.length;e++){var k=(u=_[e])._anchorAxis;u._linepositions={},u._lw=c.crispRound(t,u.linewidth,1),u._mainLinePosition=T(u,k,u.side),u._mainMirrorPosition=u.mirror&&k?T(u,k,p.OPPOSITE_SIDE[u.side]):null}var M=[],A=[],S=[],E=1===l.opacity(m.paper_bgcolor)&&1===l.opacity(m.plot_bgcolor)&&m.paper_bgcolor===m.plot_bgcolor;for(i in m._plots)if((s=m._plots[i]).mainplot)s.bg&&s.bg.remove(),s.bg=void 0;else{var C=s.xaxis.domain,L=s.yaxis.domain,I=s.plotgroup;if(y(C,L,S)){var P=I.node(),z=s.bg=o.ensureSingle(I,\"rect\",\"bg\");P.insertBefore(z.node(),P.childNodes[0]),A.push(i)}else I.select(\"rect.bg\").remove(),S.push([C,L]),E||(M.push(i),A.push(i))}var O,D,R,F,B,N,j,U,V,q,H,G,Y,W=m._bgLayer.selectAll(\".bg\").data(M);for(W.enter().append(\"rect\").classed(\"bg\",!0),W.exit().remove(),W.each((function(t){m._plots[t].bg=n.select(this)})),e=0;eT?u.push({code:\"unused\",traceType:y,templateCount:w,dataCount:T}):T>w&&u.push({code:\"reused\",traceType:y,templateCount:w,dataCount:T})}}else u.push({code:\"data\"});if(function t(e,r){for(var n in e)if(\"_\"!==n.charAt(0)){var a=e[n],o=g(e,n,r);i(a)?(Array.isArray(e)&&!1===a._template&&a.templateitemname&&u.push({code:\"missing\",path:o,templateitemname:a.templateitemname}),t(a,o)):Array.isArray(a)&&m(a)&&t(a,o)}}({data:p,layout:h},\"\"),u.length)return u.map(v)}},{\"../lib\":778,\"../plots/attributes\":824,\"../plots/plots\":891,\"./plot_config\":815,\"./plot_schema\":816,\"./plot_template\":817}],820:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"./plot_api\"),a=t(\"../plots/plots\"),o=t(\"../lib\"),s=t(\"../snapshot/helpers\"),l=t(\"../snapshot/tosvg\"),c=t(\"../snapshot/svgtoimg\"),u=t(\"../version\").version,f={format:{valType:\"enumerated\",values:[\"png\",\"jpeg\",\"webp\",\"svg\",\"full-json\"],dflt:\"png\"},width:{valType:\"number\",min:1},height:{valType:\"number\",min:1},scale:{valType:\"number\",min:0,dflt:1},setBackground:{valType:\"any\",dflt:!1},imageDataOnly:{valType:\"boolean\",dflt:!1}};e.exports=function(t,e){var r,h,p,d;function g(t){return!(t in e)||o.validate(e[t],f[t])}if(e=e||{},o.isPlainObject(t)?(r=t.data||[],h=t.layout||{},p=t.config||{},d={}):(t=o.getGraphDiv(t),r=o.extendDeep([],t.data),h=o.extendDeep({},t.layout),p=t._context,d=t._fullLayout||{}),!g(\"width\")&&null!==e.width||!g(\"height\")&&null!==e.height)throw new Error(\"Height and width should be pixel values.\");if(!g(\"format\"))throw new Error(\"Export format is not \"+o.join2(f.format.values,\", \",\" or \")+\".\");var m={};function v(t,r){return o.coerce(e,m,f,t,r)}var y=v(\"format\"),x=v(\"width\"),b=v(\"height\"),_=v(\"scale\"),w=v(\"setBackground\"),T=v(\"imageDataOnly\"),k=document.createElement(\"div\");k.style.position=\"absolute\",k.style.left=\"-5000px\",document.body.appendChild(k);var M=o.extendFlat({},h);x?M.width=x:null===e.width&&n(d.width)&&(M.width=d.width),b?M.height=b:null===e.height&&n(d.height)&&(M.height=d.height);var A=o.extendFlat({},p,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),S=s.getRedrawFunc(k);function E(){return new Promise((function(t){setTimeout(t,s.getDelay(k._fullLayout))}))}function C(){return new Promise((function(t,e){var r=l(k,y,_),n=k._fullLayout.width,f=k._fullLayout.height;function h(){i.purge(k),document.body.removeChild(k)}if(\"full-json\"===y){var p=a.graphJson(k,!1,\"keepdata\",\"object\",!0,!0);return p.version=u,p=JSON.stringify(p),h(),t(T?p:s.encodeJSON(p))}if(h(),\"svg\"===y)return t(T?r:s.encodeSVG(r));var d=document.createElement(\"canvas\");d.id=o.randstr(),c({format:y,width:n,height:f,scale:_,canvas:d,svg:r,promise:!0}).then(t).catch(e)}))}return new Promise((function(t,e){i.plot(k,r,M,A).then(S).then(E).then(C).then((function(e){t(function(t){return T?t.replace(s.IMAGE_URL_PREFIX,\"\"):t}(e))})).catch((function(t){e(t)}))}))}},{\"../lib\":778,\"../plots/plots\":891,\"../snapshot/helpers\":915,\"../snapshot/svgtoimg\":917,\"../snapshot/tosvg\":919,\"../version\":1370,\"./plot_api\":814,\"fast-isnumeric\":241}],821:[function(t,e,r){\"use strict\";var n=t(\"../lib\"),i=t(\"../plots/plots\"),a=t(\"./plot_schema\"),o=t(\"./plot_config\").dfltConfig,s=n.isPlainObject,l=Array.isArray,c=n.isArrayOrTypedArray;function u(t,e,r,i,a,o){o=o||[];for(var f=Object.keys(t),h=0;hx.length&&i.push(d(\"unused\",a,v.concat(x.length)));var M,A,S,E,C,L=x.length,I=Array.isArray(k);if(I&&(L=Math.min(L,k.length)),2===b.dimensions)for(A=0;Ax[A].length&&i.push(d(\"unused\",a,v.concat(A,x[A].length)));var P=x[A].length;for(M=0;M<(I?Math.min(P,k[A].length):P);M++)S=I?k[A][M]:k,E=y[A][M],C=x[A][M],n.validate(E,S)?C!==E&&C!==+E&&i.push(d(\"dynamic\",a,v.concat(A,M),E,C)):i.push(d(\"value\",a,v.concat(A,M),E))}else i.push(d(\"array\",a,v.concat(A),y[A]));else for(A=0;A1&&p.push(d(\"object\",\"layout\"))),i.supplyDefaults(g);for(var m=g._fullData,v=r.length,y=0;y0&&Math.round(f)===f))return i;c=f}for(var h=e.calendar,p=\"start\"===l,d=\"end\"===l,g=t[r+\"period0\"],m=a(g,h)||0,v=[],y=i.length,x=0;xT;)w=o(w,-c,h);for(;w<=T;)w=o(w,c,h);_=o(w,-c,h)}else{for(w=m+(b=Math.round((T-m)/u))*u;w>T;)w-=u;for(;w<=T;)w+=u;_=w-u}v[x]=p?_:d?w:(_+w)/2}return v}},{\"../../constants/numerical\":753,\"../../lib\":778,\"fast-isnumeric\":241}],826:[function(t,e,r){\"use strict\";e.exports={xaxis:{valType:\"subplotid\",dflt:\"x\",editType:\"calc+clearAxisTypes\"},yaxis:{valType:\"subplotid\",dflt:\"y\",editType:\"calc+clearAxisTypes\"}}},{}],827:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\"),a=t(\"../../constants/numerical\").FP_SAFE,o=t(\"../../registry\"),s=t(\"./axis_ids\"),l=s.getFromId,c=s.isLinked;function u(t,e){var r,n,a=[],o=t._fullLayout,s=h(o,e,0),l=h(o,e,1),c=p(t,e),u=c.min,d=c.max;if(0===u.length||0===d.length)return i.simpleMap(e.range,e.r2l);var g=u[0].val,m=d[0].val;for(r=1;r0&&((T=E-s(x)-l(b))>C?k/T>L&&(_=x,w=b,L=k/T):k/E>L&&(_={val:x.val,nopad:1},w={val:b.val,nopad:1},L=k/E));if(g===m){var I=g-1,P=g+1;if(A)if(0===g)a=[0,1];else{var z=(g>0?d:u).reduce((function(t,e){return Math.max(t,l(e))}),0),O=g/(1-Math.min(.5,z/E));a=g>0?[0,O]:[O,0]}else a=S?[Math.max(0,I),Math.max(1,P)]:[I,P]}else A?(_.val>=0&&(_={val:0,nopad:1}),w.val<=0&&(w={val:0,nopad:1})):S&&(_.val-L*s(_)<0&&(_={val:0,nopad:1}),w.val<=0&&(w={val:1,nopad:1})),L=(w.val-_.val-f(e,x.val,b.val))/(E-s(_)-l(w)),a=[_.val-L*s(_),w.val+L*l(w)];return v&&a.reverse(),i.simpleMap(a,e.l2r||Number)}function f(t,e,r){var n=0;if(t.rangebreaks)for(var i=t.locateBreaks(e,r),a=0;a0?r.ppadplus:r.ppadminus)||r.ppad||0),S=M((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),E=M(r.vpadplus||r.vpad),C=M(r.vpadminus||r.vpad);if(!T){if(h=1/0,p=-1/0,w)for(i=0;i0&&(h=o),o>p&&o-a&&(h=o),o>p&&o=P;i--)I(i);return{min:m,max:y,opts:r}},concatExtremes:p};function p(t,e,r){var n,i,a,o=e._id,s=t._fullData,c=t._fullLayout,u=[],f=[];function h(t,e){for(n=0;n=r&&(c.extrapad||!o)){s=!1;break}i(e,c.val)&&c.pad<=r&&(o||!c.extrapad)&&(t.splice(l,1),l--)}if(s){var u=a&&0===e;t.push({val:e,pad:u?0:r,extrapad:!u&&o})}}function v(t){return n(t)&&Math.abs(t)=e}},{\"../../constants/numerical\":753,\"../../lib\":778,\"../../registry\":911,\"./axis_ids\":831,\"fast-isnumeric\":241}],828:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"fast-isnumeric\"),a=t(\"../../plots/plots\"),o=t(\"../../registry\"),s=t(\"../../lib\"),l=s.strTranslate,c=t(\"../../lib/svg_text_utils\"),u=t(\"../../components/titles\"),f=t(\"../../components/color\"),h=t(\"../../components/drawing\"),p=t(\"./layout_attributes\"),d=t(\"./clean_ticks\"),g=t(\"../../constants/numerical\"),m=g.ONEMAXYEAR,v=g.ONEAVGYEAR,y=g.ONEMINYEAR,x=g.ONEMAXQUARTER,b=g.ONEAVGQUARTER,_=g.ONEMINQUARTER,w=g.ONEMAXMONTH,T=g.ONEAVGMONTH,k=g.ONEMINMONTH,M=g.ONEWEEK,A=g.ONEDAY,S=A/2,E=g.ONEHOUR,C=g.ONEMIN,L=g.ONESEC,I=g.MINUS_SIGN,P=g.BADNUM,z=t(\"../../constants/alignment\"),O=z.MID_SHIFT,D=z.CAP_SHIFT,R=z.LINE_SPACING,F=z.OPPOSITE_SIDE,B=e.exports={};B.setConvert=t(\"./set_convert\");var N=t(\"./axis_autotype\"),j=t(\"./axis_ids\"),U=j.idSort,V=j.isLinked;B.id2name=j.id2name,B.name2id=j.name2id,B.cleanId=j.cleanId,B.list=j.list,B.listIds=j.listIds,B.getFromId=j.getFromId,B.getFromTrace=j.getFromTrace;var q=t(\"./autorange\");B.getAutoRange=q.getAutoRange,B.findExtremes=q.findExtremes;function H(t){var e=1e-4*(t[1]-t[0]);return[t[0]-e,t[1]+e]}B.coerceRef=function(t,e,r,n,i,a){var o=n.charAt(n.length-1),l=r._fullLayout._subplots[o+\"axis\"],c=n+\"ref\",u={};return i||(i=l[0]||(\"string\"==typeof a?a:a[0])),a||(a=i),l=l.concat(l.map((function(t){return t+\" domain\"}))),u[c]={valType:\"enumerated\",values:l.concat(a?\"string\"==typeof a?[a]:a:[]),dflt:i},s.coerce(t,e,u,c)},B.getRefType=function(t){return void 0===t?t:\"paper\"===t?\"paper\":\"pixel\"===t?\"pixel\":/( domain)$/.test(t)?\"domain\":\"range\"},B.coercePosition=function(t,e,r,n,i,a){var o,l;if(\"range\"!==B.getRefType(n))o=s.ensureNumber,l=r(i,a);else{var c=B.getFromId(e,n);l=r(i,a=c.fraction2r(a)),o=c.cleanPos}t[i]=o(l)},B.cleanPosition=function(t,e,r){return(\"paper\"===r||\"pixel\"===r?s.ensureNumber:B.getFromId(e,r).cleanPos)(t)},B.redrawComponents=function(t,e){e=e||B.listIds(t);var r=t._fullLayout;function n(n,i,a,s){for(var l=o.getComponentMethod(n,i),c={},u=0;u2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},B.saveRangeInitial=function(t,e){for(var r=B.list(t,\"\",!0),n=!1,i=0;i.3*h||u(n)||u(a))){var p=r.dtick/2;t+=t+p.8){var o=Number(r.substr(1));a.exactYears>.8&&o%12==0?t=B.tickIncrement(t,\"M6\",\"reverse\")+1.5*A:a.exactMonths>.8?t=B.tickIncrement(t,\"M1\",\"reverse\")+15.5*A:t-=S;var l=B.tickIncrement(t,r);if(l<=n)return l}return t}(y,t,v,c,a)),m=y,0;m<=u;)m=B.tickIncrement(m,v,!1,a);return{start:e.c2r(y,0,a),end:e.c2r(m,0,a),size:v,_dataSpan:u-c}},B.prepTicks=function(t,e){var r=s.simpleMap(t.range,t.r2l,void 0,void 0,e);if(t._dtickInit=t.dtick,t._tick0Init=t.tick0,\"auto\"===t.tickmode||!t.dtick){var n,a=t.nticks;a||(\"category\"===t.type||\"multicategory\"===t.type?(n=t.tickfont?1.2*(t.tickfont.size||12):15,a=t._length/n):(n=\"y\"===t._id.charAt(0)?40:80,a=s.constrain(t._length/n,4,9)+1),\"radialaxis\"===t._name&&(a*=2)),\"array\"===t.tickmode&&(a*=100),t._roughDTick=Math.abs(r[1]-r[0])/a,B.autoTicks(t,t._roughDTick),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}\"period\"===t.ticklabelmode&&function(t){var e;function r(){return!(i(t.dtick)||\"M\"!==t.dtick.charAt(0))}var n=r(),a=B.getTickFormat(t);if(a){var o=t._dtickInit!==t.dtick;/%[fLQsSMX]/.test(a)||(/%[HI]/.test(a)?(e=E,o&&!n&&t.dticka&&f=o:p<=o;p=B.tickIncrement(p,t.dtick,l,t.calendar)){if(t.rangebreaks&&!l){if(p=u)break}if(C.length>g||p===L)break;L=p;var I=!1;f&&p!==(0|p)&&(I=!0),C.push({minor:I,value:p})}if(h&&function(t,e,r){for(var n=0;n0?(a=n-1,o=n):(a=n,o=n);var s,l=t[a].value,c=t[o].value,u=Math.abs(c-l),f=r||u,h=0;f>=y?h=u>=y&&u<=m?u:v:r===b&&f>=_?h=u>=_&&u<=x?u:b:f>=k?h=u>=k&&u<=w?u:T:r===M&&f>=M?h=M:f>=A?h=A:r===S&&f>=S?h=S:r===E&&f>=E&&(h=E),h>=u&&(h=u,s=!0);var p=i+h;if(e.rangebreaks&&h>0){for(var d=0,g=0;g<84;g++){var C=(g+.5)/84;e.maskBreaks(i*(1-C)+C*p)!==P&&d++}(h*=d/84)||(t[n].drop=!0),s&&u>M&&(h=u)}(h>0||0===n)&&(t[n].periodX=i+h/2)}}(C,t,t._definedDelta),t.rangebreaks){var z=\"y\"===t._id.charAt(0),O=1;\"auto\"===t.tickmode&&(O=t.tickfont?t.tickfont.size:12);var D=NaN;for(d=C.length-1;d>-1;d--)if(C[d].drop)C.splice(d,1);else{C[d].value=wt(C[d].value,t);var R=t.c2p(C[d].value);(z?D>R-O:Du||Nu&&(F.periodX=u),N10||\"01-01\"!==n.substr(5)?t._tickround=\"d\":t._tickround=+e.substr(1)%12==0?\"y\":\"m\";else if(e>=A&&a<=10||e>=15*A)t._tickround=\"d\";else if(e>=C&&a<=16||e>=E)t._tickround=\"M\";else if(e>=L&&a<=19||e>=C)t._tickround=\"S\";else{var o=t.l2r(r+e).replace(/^-/,\"\").length;t._tickround=Math.max(a,o)-20,t._tickround<0&&(t._tickround=4)}}else if(i(e)||\"L\"===e.charAt(0)){var s=t.range.map(t.r2d||Number);i(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),c=Math.floor(Math.log(l)/Math.LN10+.01),u=void 0===t.minexponent?3:t.minexponent;Math.abs(c)>u&&(ot(t.exponentformat)&&!st(c)?t._tickexponent=3*Math.round((c-1)/3):t._tickexponent=c)}else t._tickround=null}function it(t,e,r){var n=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||\"\",fontSize:n.size,font:n.family,fontColor:n.color}}B.autoTicks=function(t,e){var r;function n(t){return Math.pow(t,Math.floor(Math.log(e)/Math.LN10))}if(\"date\"===t.type){t.tick0=s.dateTick0(t.calendar,0);var a=2*e;if(a>v)e/=v,r=n(10),t.dtick=\"M\"+12*rt(e,r,Z);else if(a>T)e/=T,t.dtick=\"M\"+rt(e,1,J);else if(a>A){t.dtick=rt(e,A,t._hasDayOfWeekBreaks?[1,2,7,14]:Q);var o=B.getTickFormat(t),l=\"period\"===t.ticklabelmode;l&&(t._rawTick0=t.tick0),/%[uVW]/.test(o)?t.tick0=s.dateTick0(t.calendar,2):t.tick0=s.dateTick0(t.calendar,1),l&&(t._dowTick0=t.tick0)}else a>E?t.dtick=rt(e,E,J):a>C?t.dtick=rt(e,C,K):a>L?t.dtick=rt(e,L,K):(r=n(10),t.dtick=rt(e,r,Z))}else if(\"log\"===t.type){t.tick0=0;var c=s.simpleMap(t.range,t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(c[1]-c[0])<1){var u=1.5*Math.abs((c[1]-c[0])/e);e=Math.abs(Math.pow(10,c[1])-Math.pow(10,c[0]))/u,r=n(10),t.dtick=\"L\"+rt(e,r,Z)}else t.dtick=e>.3?\"D2\":\"D1\"}else\"category\"===t.type||\"multicategory\"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):_t(t)?(t.tick0=0,r=1,t.dtick=rt(e,r,et)):(t.tick0=0,r=n(10),t.dtick=rt(e,r,Z));if(0===t.dtick&&(t.dtick=1),!i(t.dtick)&&\"string\"!=typeof t.dtick){var f=t.dtick;throw t.dtick=1,\"ax.dtick error: \"+String(f)}},B.tickIncrement=function(t,e,r,a){var o=r?-1:1;if(i(e))return s.increment(t,o*e);var l=e.charAt(0),c=o*Number(e.substr(1));if(\"M\"===l)return s.incrementMonth(t,c,a);if(\"L\"===l)return Math.log(Math.pow(10,t)+c)/Math.LN10;if(\"D\"===l){var u=\"D2\"===e?tt:$,f=t+.01*o,h=s.roundUp(s.mod(f,1),u,r);return Math.floor(f)+Math.log(n.round(Math.pow(10,h),1))/Math.LN10}throw\"unrecognized dtick \"+String(e)},B.tickFirst=function(t,e){var r=t.r2l||Number,a=s.simpleMap(t.range,r,void 0,void 0,e),o=a[1] \")}else t._prevDateHead=l,c+=\"
\"+l;e.text=c}(t,o,r,c):\"log\"===u?function(t,e,r,n,a){var o=t.dtick,l=e.x,c=t.tickformat,u=\"string\"==typeof o&&o.charAt(0);\"never\"===a&&(a=\"\");n&&\"L\"!==u&&(o=\"L3\",u=\"L\");if(c||\"L\"===u)e.text=lt(Math.pow(10,l),t,a,n);else if(i(o)||\"D\"===u&&s.mod(l+.01,1)<.1){var f=Math.round(l),h=Math.abs(f),p=t.exponentformat;\"power\"===p||ot(p)&&st(f)?(e.text=0===f?1:1===f?\"10\":\"10\"+(f>1?\"\":I)+h+\"\",e.fontSize*=1.25):(\"e\"===p||\"E\"===p)&&h>2?e.text=\"1\"+p+(f>0?\"+\":I)+h:(e.text=lt(Math.pow(10,l),t,\"\",\"fakehover\"),\"D1\"===o&&\"y\"===t._id.charAt(0)&&(e.dy-=e.fontSize/6))}else{if(\"D\"!==u)throw\"unrecognized dtick \"+String(o);e.text=String(Math.round(Math.pow(10,s.mod(l,1)))),e.fontSize*=.75}if(\"D1\"===t.dtick){var d=String(e.text).charAt(0);\"0\"!==d&&\"1\"!==d||(\"y\"===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(l<0?.5:.25)))}}(t,o,0,c,g):\"category\"===u?function(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=\"\");e.text=String(r)}(t,o):\"multicategory\"===u?function(t,e,r){var n=Math.round(e.x),i=t._categories[n]||[],a=void 0===i[1]?\"\":String(i[1]),o=void 0===i[0]?\"\":String(i[0]);r?e.text=o+\" - \"+a:(e.text=a,e.text2=o)}(t,o,r):_t(t)?function(t,e,r,n,i){if(\"radians\"!==t.thetaunit||r)e.text=lt(e.x,t,i,n);else{var a=e.x/180;if(0===a)e.text=\"0\";else{var o=function(t){function e(t,e){return Math.abs(t-e)<=1e-6}var r=function(t){for(var r=1;!e(Math.round(t*r)/r,t);)r*=10;return r}(t),n=t*r,i=Math.abs(function t(r,n){return e(n,0)?r:t(n,r%n)}(n,r));return[Math.round(n/i),Math.round(r/i)]}(a);if(o[1]>=100)e.text=lt(s.deg2rad(e.x),t,i,n);else{var l=e.x<0;1===o[1]?1===o[0]?e.text=\"\\u03c0\":e.text=o[0]+\"\\u03c0\":e.text=[\"\",o[0],\"\",\"\\u2044\",\"\",o[1],\"\",\"\\u03c0\"].join(\"\"),l&&(e.text=I+e.text)}}}}(t,o,r,c,g):function(t,e,r,n,i){\"never\"===i?i=\"\":\"all\"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(i=\"hide\");e.text=lt(e.x,t,i,n)}(t,o,0,c,g),n||(t.tickprefix&&!d(t.showtickprefix)&&(o.text=t.tickprefix+o.text),t.ticksuffix&&!d(t.showticksuffix)&&(o.text+=t.ticksuffix)),\"boundaries\"===t.tickson||t.showdividers){var m=function(e){var r=t.l2p(e);return r>=0&&r<=t._length?e:null};o.xbnd=[m(o.x-.5),m(o.x+t.dtick-.5)]}return o},B.hoverLabelText=function(t,e,r){if(r!==P&&r!==e)return B.hoverLabelText(t,e)+\" - \"+B.hoverLabelText(t,r);var n=\"log\"===t.type&&e<=0,i=B.tickText(t,t.c2l(n?-e:e),\"hover\").text;return n?0===e?\"0\":I+i:i};var at=[\"f\",\"p\",\"n\",\"\\u03bc\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\"];function ot(t){return\"SI\"===t||\"B\"===t}function st(t){return t>14||t<-15}function lt(t,e,r,n){var a=t<0,o=e._tickround,l=r||e.exponentformat||\"B\",c=e._tickexponent,u=B.getTickFormat(e),f=e.separatethousands;if(n){var h={exponentformat:l,minexponent:e.minexponent,dtick:\"none\"===e.showexponent?e.dtick:i(t)&&Math.abs(t)||1,range:\"none\"===e.showexponent?e.range.map(e.r2d):[0,t||1]};nt(h),o=(Number(h._tickround)||0)+4,c=h._tickexponent,e.hoverformat&&(u=e.hoverformat)}if(u)return e._numFormat(u)(t).replace(/-/g,I);var p,d=Math.pow(10,-o)/2;if(\"none\"===l&&(c=0),(t=Math.abs(t))\"+p+\"\":\"B\"===l&&9===c?t+=\"B\":ot(l)&&(t+=at[c/3+5]));return a?I+t:t}function ct(t,e){for(var r=[],n={},i=0;i1&&r=i.min&&t=0,a=u(t,e[1])<=0;return(r||i)&&(n||a)}if(t.tickformatstops&&t.tickformatstops.length>0)switch(t.type){case\"date\":case\"linear\":for(e=0;e=o(i)))){r=n;break}break;case\"log\":for(e=0;e0?r.bottom-f:0,h)))),e.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var p=[0,1];if(\"x\"===d){if(\"b\"===l?n[l]=e._depth:(n[l]=e._depth=Math.max(r.width>0?f-r.top:0,h),p.reverse()),r.width>0){var m=r.right-(e._offset+e._length);m>0&&(n.xr=1,n.r=m);var v=e._offset-r.left;v>0&&(n.xl=0,n.l=v)}}else if(\"l\"===l?n[l]=e._depth=Math.max(r.height>0?f-r.left:0,h):(n[l]=e._depth=Math.max(r.height>0?r.right-f:0,h),p.reverse()),r.height>0){var y=r.bottom-(e._offset+e._length);y>0&&(n.yb=0,n.b=y);var x=e._offset-r.top;x>0&&(n.yt=1,n.t=x)}n[g]=\"free\"===e.anchor?e.position:e._anchorAxis.domain[p[0]],e.title.text!==c._dfltTitle[d]&&(n[l]+=ht(e)+(e.title.standoff||0)),e.mirror&&\"free\"!==e.anchor&&((i={x:0,y:0,r:0,l:0,t:0,b:0})[u]=e.linewidth,e.mirror&&!0!==e.mirror&&(i[u]+=h),!0===e.mirror||\"ticks\"===e.mirror?i[g]=e._anchorAxis.domain[p[1]]:\"all\"!==e.mirror&&\"allticks\"!==e.mirror||(i[g]=[e._counterDomainMin,e._counterDomainMax][p[1]]))}K&&(s=o.getComponentMethod(\"rangeslider\",\"autoMarginOpts\")(t,e)),a.autoMargin(t,gt(e),n),a.autoMargin(t,mt(e),i),a.autoMargin(t,vt(e),s)})),r.skipTitle||K&&\"bottom\"===e.side||Z.push((function(){return function(t,e){var r,n=t._fullLayout,i=e._id,a=i.charAt(0),o=e.title.font.size;if(e.title.hasOwnProperty(\"standoff\"))r=e._depth+e.title.standoff+ht(e);else{var s=-1!==(e.ticklabelposition||\"\").indexOf(\"inside\");if(\"multicategory\"===e.type)r=e._depth;else{var l=1.5*o;s&&(l=.5*o,\"outside\"===e.ticks&&(l+=e.ticklen)),r=10+l+(e.linewidth?e.linewidth-1:0)}s||(r+=\"x\"===a?\"top\"===e.side?o*(e.showticklabels?1:0):o*(e.showticklabels?1.5:.5):\"right\"===e.side?o*(e.showticklabels?1:.5):o*(e.showticklabels?.5:0))}var c,f,p,d,g=B.getPxPosition(t,e);\"x\"===a?(f=e._offset+e._length/2,p=\"top\"===e.side?g-r:g+r):(p=e._offset+e._length/2,f=\"right\"===e.side?g+r:g-r,c={rotate:\"-90\",offset:0});if(\"multicategory\"!==e.type){var m=e._selections[e._id+\"tick\"];if(d={selection:m,side:e.side},m&&m.node()&&m.node().parentNode){var v=h.getTranslate(m.node().parentNode);d.offsetLeft=v.x,d.offsetTop=v.y}e.title.hasOwnProperty(\"standoff\")&&(d.pad=0)}return u.draw(t,i+\"title\",{propContainer:e,propName:e._name+\".title.text\",placeholder:n._dfltTitle[a],avoid:d,transform:c,attributes:{x:f,y:p,\"text-anchor\":\"middle\"}})}(t,e)})),s.syncOrAsync(Z)}}function Q(t){var r=p+(t||\"tick\");return w[r]||(w[r]=function(t,e){var r,n,i,a;t._selections[e].size()?(r=1/0,n=-1/0,i=1/0,a=-1/0,t._selections[e].each((function(){var t=dt(this),e=h.bBox(t.node().parentNode);r=Math.min(r,e.top),n=Math.max(n,e.bottom),i=Math.min(i,e.left),a=Math.max(a,e.right)}))):(r=0,n=0,i=0,a=0);return{top:r,bottom:n,left:i,right:a,height:n-r,width:a-i}}(e,r)),w[r]}},B.getTickSigns=function(t){var e=t._id.charAt(0),r={x:\"top\",y:\"right\"}[e],n=t.side===r?1:-1,i=[-1,1,n,-n];return\"inside\"!==t.ticks==(\"x\"===e)&&(i=i.map((function(t){return-t}))),t.side&&i.push({l:-1,t:-1,r:1,b:1}[t.side.charAt(0)]),i},B.makeTransTickFn=function(t){return\"x\"===t._id.charAt(0)?function(e){return l(t._offset+t.l2p(e.x),0)}:function(e){return l(0,t._offset+t.l2p(e.x))}},B.makeTransTickLabelFn=function(t){var e=function(t){var e=t.ticklabelposition||\"\",r=function(t){return-1!==e.indexOf(t)},n=r(\"top\"),i=r(\"left\"),a=r(\"right\"),o=r(\"bottom\"),s=r(\"inside\"),l=o||i||n||a;if(!l&&!s)return[0,0];var c=t.side,u=l?(t.tickwidth||0)/2:0,f=3,h=t.tickfont?t.tickfont.size:12;(o||n)&&(u+=h*D,f+=(t.linewidth||0)/2);(i||a)&&(u+=(t.linewidth||0)/2,f+=3);s&&\"top\"===c&&(f-=h*(1-D));(i||n)&&(u=-u);\"bottom\"!==c&&\"right\"!==c||(f=-f);return[l?u:0,s?f:0]}(t),r=e[0],n=e[1];return\"x\"===t._id.charAt(0)?function(e){return l(r+t._offset+t.l2p(ut(e)),n)}:function(e){return l(n,r+t._offset+t.l2p(ut(e)))}},B.makeTickPath=function(t,e,r,n){n=void 0!==n?n:t.ticklen;var i=t._id.charAt(0),a=(t.linewidth||1)/2;return\"x\"===i?\"M0,\"+(e+a*r)+\"v\"+n*r:\"M\"+(e+a*r)+\",0h\"+n*r},B.makeLabelFns=function(t,e,r){var n=t.ticklabelposition||\"\",a=function(t){return-1!==n.indexOf(t)},o=a(\"top\"),l=a(\"left\"),c=a(\"right\"),u=a(\"bottom\")||l||o||c,f=a(\"inside\"),h=\"inside\"===n&&\"inside\"===t.ticks||!f&&\"outside\"===t.ticks&&\"boundaries\"!==t.tickson,p=0,d=0,g=h?t.ticklen:0;if(f?g*=-1:u&&(g=0),h&&(p+=g,r)){var m=s.deg2rad(r);p=g*Math.cos(m)+1,d=g*Math.sin(m)}t.showticklabels&&(h||t.showline)&&(p+=.2*t.tickfont.size);var v,y,x,b,_,w={labelStandoff:p+=(t.linewidth||1)/2*(f?-1:1),labelShift:d},T=0,k=t.side,M=t._id.charAt(0),A=t.tickangle;if(\"x\"===M)b=(_=!f&&\"bottom\"===k||f&&\"top\"===k)?1:-1,f&&(b*=-1),v=d*b,y=e+p*b,x=_?1:-.2,90===Math.abs(A)&&(f?x+=O:x=-90===A&&\"bottom\"===k?D:90===A&&\"top\"===k?O:.5,T=O/2*(A/90)),w.xFn=function(t){return t.dx+v+T*t.fontSize},w.yFn=function(t){return t.dy+y+t.fontSize*x},w.anchorFn=function(t,e){if(u){if(l)return\"end\";if(c)return\"start\"}return i(e)&&0!==e&&180!==e?e*b<0!==f?\"end\":\"start\":\"middle\"},w.heightFn=function(e,r,n){return r<-60||r>60?-.5*n:\"top\"===t.side!==f?-n:0};else if(\"y\"===M){if(b=(_=!f&&\"left\"===k||f&&\"right\"===k)?1:-1,f&&(b*=-1),v=p,y=d*b,x=0,f||90!==Math.abs(A)||(x=-90===A&&\"left\"===k||90===A&&\"right\"===k?D:.5),f){var S=i(A)?+A:0;if(0!==S){var E=s.deg2rad(S);T=Math.abs(Math.sin(E))*D*b,x=0}}w.xFn=function(t){return t.dx+e-(v+t.fontSize*x)*b+T*t.fontSize},w.yFn=function(t){return t.dy+y+t.fontSize*O},w.anchorFn=function(t,e){return i(e)&&90===Math.abs(e)?\"middle\":_?\"end\":\"start\"},w.heightFn=function(e,r,n){return\"right\"===t.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return w},B.drawTicks=function(t,e,r){r=r||{};var n=e._id+\"tick\",i=r.vals;\"period\"===e.ticklabelmode&&(i=i.slice()).shift();var a=r.layer.selectAll(\"path.\"+n).data(e.ticks?i:[],ft);a.exit().remove(),a.enter().append(\"path\").classed(n,1).classed(\"ticks\",1).classed(\"crisp\",!1!==r.crisp).call(f.stroke,e.tickcolor).style(\"stroke-width\",h.crispRound(t,e.tickwidth,1)+\"px\").attr(\"d\",r.path),a.attr(\"transform\",r.transFn)},B.drawGrid=function(t,e,r){r=r||{};var n=e._id+\"grid\",i=r.vals,a=r.counterAxis;if(!1===e.showgrid)i=[];else if(a&&B.shouldShowZeroLine(t,e,a))for(var o=\"array\"===e.tickmode,s=0;so||i.lefto||i.top+(e.tickangle?0:t.fontSize/4)1)for(n=1;n2*o}(i,e))return\"date\";var m=\"strict\"!==r.autotypenumbers;return function(t,e){for(var r=t.length,n=f(r),i=0,o=0,s={},u=0;u2*i}(i,m)?\"category\":function(t,e){for(var r=t.length,n=0;n=2){var l,c,u=\"\";if(2===o.length)for(l=0;l<2;l++)if(c=y(o[l])){u=d;break}var f=i(\"pattern\",u);if(f===d)for(l=0;l<2;l++)(c=y(o[l]))&&(e.bounds[l]=o[l]=c-1);if(f)for(l=0;l<2;l++)switch(c=o[l],f){case d:if(!n(c))return void(e.enabled=!1);if((c=+c)!==Math.floor(c)||c<0||c>=7)return void(e.enabled=!1);e.bounds[l]=o[l]=c;break;case g:if(!n(c))return void(e.enabled=!1);if((c=+c)<0||c>24)return void(e.enabled=!1);e.bounds[l]=o[l]=c}if(!1===r.autorange){var h=r.range;if(h[0]h[1])return void(e.enabled=!1)}else if(o[0]>h[0]&&o[1]n?1:-1:+(t.substr(1)||1)-+(e.substr(1)||1)},r.ref2id=function(t){return!!/^[xyz]/.test(t)&&t.split(\" \")[0]},r.isLinked=function(t,e){return a(e,t._axisMatchGroups)||a(e,t._axisConstraintGroups)}},{\"../../registry\":911,\"./constants\":834}],832:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n){if(\"category\"===e.type){var i,a=t.categoryarray,o=Array.isArray(a)&&a.length>0;o&&(i=\"array\");var s,l=r(\"categoryorder\",i);\"array\"===l&&(s=r(\"categoryarray\")),o||\"array\"!==l||(l=e.categoryorder=\"trace\"),\"trace\"===l?e._initialCategories=[]:\"array\"===l?e._initialCategories=s.slice():(s=function(t,e){var r,n,i,a=e.dataAttr||t._id.charAt(0),o={};if(e.axData)r=e.axData;else for(r=[],n=0;nn?i.substr(n):a.substr(r))+o:i+a+t*e:o}function m(t,e){for(var r=e._size,n=r.h/r.w,i={},a=Object.keys(t),o=0;oc*x)||T)for(r=0;rz&&FI&&(I=F);h/=(I-L)/(2*P),L=l.l2r(L),I=l.l2r(I),l.range=l._input.range=S=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function B(t,e,r,n,i){return t.append(\"path\").attr(\"class\",\"zoombox\").style({fill:e>.2?\"rgba(0,0,0,0)\":\"rgba(255,255,255,0)\",\"stroke-width\":0}).attr(\"transform\",l(r,n)).attr(\"d\",i+\"Z\")}function N(t,e,r){return t.append(\"path\").attr(\"class\",\"zoombox-corners\").style({fill:u.background,stroke:u.defaultLine,\"stroke-width\":1,opacity:0}).attr(\"transform\",l(e,r)).attr(\"d\",\"M0,0Z\")}function j(t,e,r,n,i,a){t.attr(\"d\",n+\"M\"+r.l+\",\"+r.t+\"v\"+r.h+\"h\"+r.w+\"v-\"+r.h+\"h-\"+r.w+\"Z\"),U(t,e,i,a)}function U(t,e,r,n){r||(t.transition().style(\"fill\",n>.2?\"rgba(0,0,0,0.4)\":\"rgba(255,255,255,0.3)\").duration(200),e.transition().style(\"opacity\",1).duration(200))}function V(t){n.select(t).selectAll(\".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners\").remove()}function q(t){I&&t.data&&t._context.showTips&&(s.notifier(s._(t,\"Double-click to zoom back out\"),\"long\"),I=!1)}function H(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,L)/2);return\"M\"+(t.l-3.5)+\",\"+(t.t-.5+e)+\"h3v\"+-e+\"h\"+e+\"v-3h-\"+(e+3)+\"ZM\"+(t.r+3.5)+\",\"+(t.t-.5+e)+\"h-3v\"+-e+\"h\"+-e+\"v-3h\"+(e+3)+\"ZM\"+(t.r+3.5)+\",\"+(t.b+.5-e)+\"h-3v\"+e+\"h\"+-e+\"v3h\"+(e+3)+\"ZM\"+(t.l-3.5)+\",\"+(t.b+.5-e)+\"h3v\"+e+\"h\"+e+\"v3h-\"+(e+3)+\"Z\"}function G(t,e,r,n,i){for(var a,o,l,c,u=!1,f={},h={},p=(i||{}).xaHash,d=(i||{}).yaHash,g=0;g=0)i._fullLayout._deactivateShape(i);else{var a=i._fullLayout.clickmode;if(V(i),2!==t||mt||qt(),gt)a.indexOf(\"select\")>-1&&A(r,i,Z,J,e.id,Lt),a.indexOf(\"event\")>-1&&h.click(i,r,e.id);else if(1===t&&mt){var s=d?P:I,l=\"s\"===d||\"w\"===m?0:1,u=s._name+\".range[\"+l+\"]\",f=function(t,e){var r,i=t.range[e],a=Math.abs(i-t.range[1-e]);return\"date\"===t.type?i:\"log\"===t.type?(r=Math.ceil(Math.max(0,-Math.log(a)/Math.LN10))+3,n.format(\".\"+r+\"g\")(Math.pow(10,i))):(r=Math.floor(Math.log(Math.abs(i))/Math.LN10)-Math.floor(Math.log(a)/Math.LN10)+4,n.format(\".\"+String(r)+\"g\")(i))}(s,l),p=\"left\",g=\"middle\";if(s.fixedrange)return;d?(g=\"n\"===d?\"top\":\"bottom\",\"right\"===s.side&&(p=\"right\")):\"e\"===m&&(p=\"right\"),i._context.showAxisRangeEntryBoxes&&n.select(xt).call(c.makeEditable,{gd:i,immediate:!0,background:i._fullLayout.paper_bgcolor,text:String(f),fill:s.tickfont?s.tickfont.color:\"#444\",horizontalAlign:p,verticalAlign:g}).on(\"edit\",(function(t){var e=s.d2r(t);void 0!==e&&o.call(\"_guiRelayout\",i,u,e)}))}}}function zt(e,r){if(t._transitioningWithDuration)return!1;var n=Math.max(0,Math.min($,ht*e+bt)),i=Math.max(0,Math.min(tt,pt*r+_t)),a=Math.abs(n-bt),o=Math.abs(i-_t);function s(){At=\"\",wt.r=wt.l,wt.t=wt.b,Et.attr(\"d\",\"M0,0Z\")}if(wt.l=Math.min(bt,n),wt.r=Math.max(bt,n),wt.t=Math.min(_t,i),wt.b=Math.max(_t,i),et.isSubplotConstrained)a>L||o>L?(At=\"xy\",a/$>o/tt?(o=a*tt/$,_t>i?wt.t=_t-o:wt.b=_t+o):(a=o*$/tt,bt>n?wt.l=bt-a:wt.r=bt+a),Et.attr(\"d\",H(wt))):s();else if(rt.isSubplotConstrained)if(a>L||o>L){At=\"xy\";var l=Math.min(wt.l/$,(tt-wt.b)/tt),c=Math.max(wt.r/$,(tt-wt.t)/tt);wt.l=l*$,wt.r=c*$,wt.b=(1-l)*tt,wt.t=(1-c)*tt,Et.attr(\"d\",H(wt))}else s();else!it||o0){var u;if(rt.isSubplotConstrained||!nt&&1===it.length){for(u=0;ug[1]-1/4096&&(e.domain=s),i.noneOrAll(t.domain,e.domain,s)}return r(\"layer\"),e}},{\"../../lib\":778,\"fast-isnumeric\":241}],846:[function(t,e,r){\"use strict\";var n=t(\"../../constants/alignment\").FROM_BL;e.exports=function(t,e,r){void 0===r&&(r=n[t.constraintoward||\"center\"]);var i=[t.r2l(t.range[0]),t.r2l(t.range[1])],a=i[0]+(i[1]-i[0])*r;t.range=t._input.range=[t.l2r(a+(i[0]-a)*e),t.l2r(a+(i[1]-a)*e)],t.setScale()}},{\"../../constants/alignment\":745}],847:[function(t,e,r){\"use strict\";var n=t(\"polybooljs\"),i=t(\"../../registry\"),a=t(\"../../components/drawing\").dashStyle,o=t(\"../../components/color\"),s=t(\"../../components/fx\"),l=t(\"../../components/fx/helpers\").makeEventData,c=t(\"../../components/dragelement/helpers\"),u=c.freeMode,f=c.rectMode,h=c.drawMode,p=c.openMode,d=c.selectMode,g=t(\"../../components/shapes/draw_newshape/display_outlines\"),m=t(\"../../components/shapes/draw_newshape/helpers\").handleEllipse,v=t(\"../../components/shapes/draw_newshape/newshapes\"),y=t(\"../../lib\"),x=t(\"../../lib/polygon\"),b=t(\"../../lib/throttle\"),_=t(\"./axis_ids\").getFromId,w=t(\"../../lib/clear_gl_canvases\"),T=t(\"../../plot_api/subroutines\").redrawReglTraces,k=t(\"./constants\"),M=k.MINSELECT,A=x.filter,S=x.tester,E=t(\"./handle_outline\").clearSelect,C=t(\"./helpers\"),L=C.p2r,I=C.axValue,P=C.getTransform;function z(t,e,r,n,i,a,o){var s,l,c,u,f,h,d,m,v,y=e._hoverdata,x=e._fullLayout.clickmode.indexOf(\"event\")>-1,b=[];if(function(t){return t&&Array.isArray(t)&&!0!==t[0].hoverOnBox}(y)){F(t,e,a);var _=function(t,e){var r,n,i=t[0],a=-1,o=[];for(n=0;n0?function(t,e){var r,n,i,a=[];for(i=0;i0&&a.push(r);if(1===a.length&&a[0]===e.searchInfo&&(n=e.searchInfo.cd[0].trace).selectedpoints.length===e.pointNumbers.length){for(i=0;i1)return!1;if((i+=r.selectedpoints.length)>1)return!1}return 1===i}(s)&&(h=j(_))){for(o&&o.remove(),v=0;v=0&&n._fullLayout._deactivateShape(n),h(e)){var a=n._fullLayout._zoomlayer.selectAll(\".select-outline-\"+r.id);if(a&&n._fullLayout._drawing){var o=v(a,t);o&&i.call(\"_guiRelayout\",n,{shapes:o}),n._fullLayout._drawing=!1}}r.selection={},r.selection.selectionDefs=t.selectionDefs=[],r.selection.mergedPolygons=t.mergedPolygons=[]}function N(t,e,r,n){var i,a,o,s=[],l=e.map((function(t){return t._id})),c=r.map((function(t){return t._id}));for(o=0;o0?n[0]:r;return!!e.selectedpoints&&e.selectedpoints.indexOf(i)>-1}function U(t,e,r){var n,a,o,s;for(n=0;n=0)C._fullLayout._deactivateShape(C);else if(!_){var r=O.clickmode;b.done(gt).then((function(){if(b.clear(gt),2===t){for(ft.remove(),$=0;$-1&&z(e,C,i.xaxes,i.yaxes,i.subplot,i,ft),\"event\"===r&&C.emit(\"plotly_selected\",void 0);s.click(C,e)})).catch(y.error)}},i.doneFn=function(){dt.remove(),b.done(gt).then((function(){b.clear(gt),i.gd.emit(\"plotly_selected\",et),Q&&i.selectionDefs&&(Q.subtract=ut,i.selectionDefs.push(Q),i.mergedPolygons.length=0,[].push.apply(i.mergedPolygons,K)),i.doneFnCompleted&&i.doneFnCompleted(mt)})).catch(y.error),_&&B(i)}},clearSelect:E,clearSelectionsCache:B,selectOnClick:z}},{\"../../components/color\":643,\"../../components/dragelement/helpers\":661,\"../../components/drawing\":665,\"../../components/fx\":683,\"../../components/fx/helpers\":679,\"../../components/shapes/draw_newshape/display_outlines\":728,\"../../components/shapes/draw_newshape/helpers\":729,\"../../components/shapes/draw_newshape/newshapes\":730,\"../../lib\":778,\"../../lib/clear_gl_canvases\":762,\"../../lib/polygon\":790,\"../../lib/throttle\":804,\"../../plot_api/subroutines\":818,\"../../registry\":911,\"./axis_ids\":831,\"./constants\":834,\"./handle_outline\":838,\"./helpers\":839,polybooljs:517}],848:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"d3-time-format\").utcFormat,a=t(\"fast-isnumeric\"),o=t(\"../../lib\"),s=o.cleanNumber,l=o.ms2DateTime,c=o.dateTime2ms,u=o.ensureNumber,f=o.isArrayOrTypedArray,h=t(\"../../constants/numerical\"),p=h.FP_SAFE,d=h.BADNUM,g=h.LOG_CLIP,m=h.ONEWEEK,v=h.ONEDAY,y=h.ONEHOUR,x=h.ONEMIN,b=h.ONESEC,_=t(\"./axis_ids\"),w=t(\"./constants\"),T=w.HOUR_PATTERN,k=w.WEEKDAY_PATTERN;function M(t){return Math.pow(10,t)}function A(t){return null!=t}e.exports=function(t,e){e=e||{};var r=t._id||\"x\",h=r.charAt(0);function S(e,r){if(e>0)return Math.log(e)/Math.LN10;if(e<=0&&r&&t.range&&2===t.range.length){var n=t.range[0],i=t.range[1];return.5*(n+i-2*g*Math.abs(n-i))}return d}function E(e,r,n,i){if((i||{}).msUTC&&a(e))return+e;var s=c(e,n||t.calendar);if(s===d){if(!a(e))return d;e=+e;var l=Math.floor(10*o.mod(e+.05,1)),u=Math.round(e-l/10);s=c(new Date(u))+l/10}return s}function C(e,r,n){return l(e,r,n||t.calendar)}function L(e){return t._categories[Math.round(e)]}function I(e){if(A(e)){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push(\"number\"==typeof e?String(e):e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return d}function P(e){if(t._categoriesMap)return t._categoriesMap[e]}function z(t){var e=P(t);return void 0!==e?e:a(t)?+t:void 0}function O(t){return a(t)?+t:P(t)}function D(t,e,r){return n.round(r+e*t,2)}function R(t,e,r){return(t-r)/e}var F=function(e){return a(e)?D(e,t._m,t._b):d},B=function(e){return R(e,t._m,t._b)};if(t.rangebreaks){var N=\"y\"===h;F=function(e){if(!a(e))return d;var r=t._rangebreaks.length;if(!r)return D(e,t._m,t._b);var n=N;t.range[0]>t.range[1]&&(n=!n);for(var i=n?-1:1,o=i*e,s=0,l=0;lu)){s=o<(c+u)/2?l:l+1;break}s=l+1}var f=t._B[s]||0;return isFinite(f)?D(e,t._m2,f):0},B=function(e){var r=t._rangebreaks.length;if(!r)return R(e,t._m,t._b);for(var n=0,i=0;it._rangebreaks[i].pmax&&(n=i+1);return R(e,t._m2,t._B[n])}}t.c2l=\"log\"===t.type?S:u,t.l2c=\"log\"===t.type?M:u,t.l2p=F,t.p2l=B,t.c2p=\"log\"===t.type?function(t,e){return F(S(t,e))}:F,t.p2c=\"log\"===t.type?function(t){return M(B(t))}:B,-1!==[\"linear\",\"-\"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=s,t.c2d=t.c2r=t.l2d=t.l2r=u,t.d2p=t.r2p=function(e){return t.l2p(s(e))},t.p2d=t.p2r=B,t.cleanPos=u):\"log\"===t.type?(t.d2r=t.d2l=function(t,e){return S(s(t),e)},t.r2d=t.r2c=function(t){return M(s(t))},t.d2c=t.r2l=s,t.c2d=t.l2r=u,t.c2r=S,t.l2d=M,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return M(B(t))},t.r2p=function(e){return t.l2p(s(e))},t.p2r=B,t.cleanPos=u):\"date\"===t.type?(t.d2r=t.r2d=o.identity,t.d2c=t.r2c=t.d2l=t.r2l=E,t.c2d=t.c2r=t.l2d=t.l2r=C,t.d2p=t.r2p=function(e,r,n){return t.l2p(E(e,0,n))},t.p2d=t.p2r=function(t,e,r){return C(B(t),e,r)},t.cleanPos=function(e){return o.cleanDate(e,d,t.calendar)}):\"category\"===t.type?(t.d2c=t.d2l=I,t.r2d=t.c2d=t.l2d=L,t.d2r=t.d2l_noadd=z,t.r2c=function(e){var r=O(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=u,t.r2l=O,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return L(B(t))},t.r2p=t.d2p,t.p2r=B,t.cleanPos=function(t){return\"string\"==typeof t&&\"\"!==t?t:u(t)}):\"multicategory\"===t.type&&(t.r2d=t.c2d=t.l2d=L,t.d2r=t.d2l_noadd=z,t.r2c=function(e){var r=z(e);return void 0!==r?r:t.fraction2r(.5)},t.r2c_just_indices=P,t.l2r=t.c2r=u,t.r2l=z,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return L(B(t))},t.r2p=t.d2p,t.p2r=B,t.cleanPos=function(t){return Array.isArray(t)||\"string\"==typeof t&&\"\"!==t?t:u(t)},t.setupMultiCategory=function(n){var i,a,s=t._traceIndices,l=t._matchGroup;if(l&&0===t._categories.length)for(var c in l)if(c!==r){var u=e[_.id2name(c)];s=s.concat(u._traceIndices)}var p=[[0,{}],[0,{}]],d=[];for(i=0;ip&&(s[n]=p),s[0]===s[1]){var c=Math.max(1,Math.abs(1e-6*s[0]));s[0]-=c,s[1]+=c}}else o.nestedProperty(t,e).set(i)},t.setScale=function(r){var n=e._size;if(t.overlaying){var i=_.getFromId({_fullLayout:e},t.overlaying);t.domain=i.domain}var a=r&&t._r?\"_r\":\"range\",o=t.calendar;t.cleanRange(a);var s,l,c=t.r2l(t[a][0],o),u=t.r2l(t[a][1],o),f=\"y\"===h;if((f?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(c-u),t._b=-t._m*u):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(u-c),t._b=-t._m*c),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks)&&(t._rangebreaks=t.locateBreaks(Math.min(c,u),Math.max(c,u)),t._rangebreaks.length)){for(s=0;su&&(p=!p),p&&t._rangebreaks.reverse();var d=p?-1:1;for(t._m2=d*t._length/(Math.abs(u-c)-t._lBreaks),t._B.push(-t._m2*(f?u:c)),s=0;si&&(i+=7,ai&&(i+=24,a=n&&a=n&&e=s.min&&(ts.max&&(s.max=n),i=!1)}i&&c.push({min:t,max:n})}};for(n=0;nr.duration?(!function(){for(var r={},n=0;n rect\").call(o.setTranslate,0,0).call(o.setScale,1,1),t.plot.call(o.setTranslate,e._offset,r._offset).call(o.setScale,1,1);var n=t.plot.selectAll(\".scatterlayer .trace\");n.selectAll(\".point\").call(o.setPointGroupScale,1,1),n.selectAll(\".textpoint\").call(o.setTextPointsScale,1,1),n.call(o.hideOutsideRangePoints,t)}function m(e,r){var n=e.plotinfo,i=n.xaxis,l=n.yaxis,c=i._length,u=l._length,f=!!e.xr1,h=!!e.yr1,p=[];if(f){var d=a.simpleMap(e.xr0,i.r2l),g=a.simpleMap(e.xr1,i.r2l),m=d[1]-d[0],v=g[1]-g[0];p[0]=(d[0]*(1-r)+r*g[0]-d[0])/(d[1]-d[0])*c,p[2]=c*(1-r+r*v/m),i.range[0]=i.l2r(d[0]*(1-r)+r*g[0]),i.range[1]=i.l2r(d[1]*(1-r)+r*g[1])}else p[0]=0,p[2]=c;if(h){var y=a.simpleMap(e.yr0,l.r2l),x=a.simpleMap(e.yr1,l.r2l),b=y[1]-y[0],_=x[1]-x[0];p[1]=(y[1]*(1-r)+r*x[1]-y[1])/(y[0]-y[1])*u,p[3]=u*(1-r+r*_/b),l.range[0]=i.l2r(y[0]*(1-r)+r*x[0]),l.range[1]=l.l2r(y[1]*(1-r)+r*x[1])}else p[1]=0,p[3]=u;s.drawOne(t,i,{skipTitle:!0}),s.drawOne(t,l,{skipTitle:!0}),s.redrawComponents(t,[i._id,l._id]);var w=f?c/p[2]:1,T=h?u/p[3]:1,k=f?p[0]:0,M=h?p[1]:0,A=f?p[0]/p[2]*c:0,S=h?p[1]/p[3]*u:0,E=i._offset-A,C=l._offset-S;n.clipRect.call(o.setTranslate,k,M).call(o.setScale,1/w,1/T),n.plot.call(o.setTranslate,E,C).call(o.setScale,w,T),o.setPointGroupScale(n.zoomScalePts,1/w,1/T),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/T)}s.redrawComponents(t)}},{\"../../components/drawing\":665,\"../../lib\":778,\"../../registry\":911,\"./axes\":828,d3:169}],853:[function(t,e,r){\"use strict\";var n=t(\"../../registry\").traceIs,i=t(\"./axis_autotype\");function a(t){return{v:\"x\",h:\"y\"}[t.orientation||\"v\"]}function o(t,e){var r=a(t),i=n(t,\"box-violin\"),o=n(t._fullInput||{},\"candlestick\");return i&&!o&&e===r&&void 0===t[r]&&void 0===t[r+\"0\"]}e.exports=function(t,e,r,s){r(\"autotypenumbers\",s.autotypenumbersDflt),\"-\"===r(\"type\",(s.splomStash||{}).type)&&(!function(t,e){if(\"-\"!==t.type)return;var r,s=t._id,l=s.charAt(0);-1!==s.indexOf(\"scene\")&&(s=l);var c=function(t,e,r){for(var n=0;n0&&(i[\"_\"+r+\"axes\"]||{})[e])return i;if((i[r+\"axis\"]||r)===e){if(o(i,r))return i;if((i[r]||[]).length||i[r+\"0\"])return i}}}(e,s,l);if(!c)return;if(\"histogram\"===c.type&&l==={v:\"y\",h:\"x\"}[c.orientation||\"v\"])return void(t.type=\"linear\");var u=l+\"calendar\",f=c[u],h={noMultiCategory:!n(c,\"cartesian\")||n(c,\"noMultiCategory\")};\"box\"===c.type&&c._hasPreCompStats&&l==={h:\"x\",v:\"y\"}[c.orientation||\"v\"]&&(h.noMultiCategory=!0);if(h.autotypenumbers=t.autotypenumbers,o(c,l)){var p=a(c),d=[];for(r=0;r0?\".\":\"\")+a;i.isPlainObject(o)?l(o,e,s,n+1):e(s,a,o)}}))}r.manageCommandObserver=function(t,e,n,o){var s={},l=!0;e&&e._commandObserver&&(s=e._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var c=r.hasSimpleAPICommandBindings(t,n,s.lookupTable);if(e&&e._commandObserver){if(c)return s;if(e._commandObserver.remove)return e._commandObserver.remove(),e._commandObserver=null,s}if(c){a(t,c,s.cache),s.check=function(){if(l){var e=a(t,c,s.cache);return e.changed&&o&&void 0!==s.lookupTable[e.value]&&(s.disable(),Promise.resolve(o({value:e.value,type:c.type,prop:c.prop,traces:c.traces,index:s.lookupTable[e.value]})).then(s.enable,s.enable)),e.changed}};for(var u=[\"plotly_relayout\",\"plotly_redraw\",\"plotly_restyle\",\"plotly_update\",\"plotly_animatingframe\",\"plotly_afterplot\"],f=0;f0&&i<0&&(i+=360);var s=(i-n)/4;return{type:\"Polygon\",coordinates:[[[n,a],[n,o],[n+s,o],[n+2*s,o],[n+3*s,o],[i,o],[i,a],[i-s,a],[i-2*s,a],[i-3*s,a],[n,a]]]}}e.exports=function(t){return new w(t)},T.plot=function(t,e,r){var n=this,i=e[this.id],a=[],o=!1;for(var s in y.layerNameToAdjective)if(\"frame\"!==s&&i[\"show\"+s]){o=!0;break}for(var l=0;l0&&a._module.calcGeoJSON(i,e)}if(!this.updateProjection(t,e)){this.viewInitial&&this.scope===r.scope||this.saveViewInitial(r),this.scope=r.scope,this.updateBaseLayers(e,r),this.updateDims(e,r),this.updateFx(e,r),u.generalUpdatePerTraceModule(this.graphDiv,this,t,r);var o=this.layers.frontplot.select(\".scatterlayer\");this.dataPoints.point=o.selectAll(\".point\"),this.dataPoints.text=o.selectAll(\"text\"),this.dataPaths.line=o.selectAll(\".js-line\");var s=this.layers.backplot.select(\".choroplethlayer\");this.dataPaths.choropleth=s.selectAll(\"path\"),this.render()}},T.updateProjection=function(t,e){var r=this.graphDiv,o=e[this.id],s=e._size,l=o.domain,c=o.projection,u=o.lonaxis,f=o.lataxis,p=u._ax,d=f._ax,g=this.projection=function(t){for(var e=t.projection.type,r=n.geo[y.projNames[e]](),i=t._isClipped?y.lonaxisSpan[e]/2:null,a=[\"center\",\"rotate\",\"parallels\",\"clipExtent\"],o=function(t){return t?r:[]},s=0;si*Math.PI/180}return!1},r.getPath=function(){return n.geo.path().projection(r)},r.getBounds=function(t){return r.getPath().bounds(t)},r.fitExtent=function(t,e){var n=t[1][0]-t[0][0],i=t[1][1]-t[0][1],a=r.clipExtent&&r.clipExtent();r.scale(150).translate([0,0]),a&&r.clipExtent(null);var o=r.getBounds(e),s=Math.min(n/(o[1][0]-o[0][0]),i/(o[1][1]-o[0][1])),l=+t[0][0]+(n-s*(o[1][0]+o[0][0]))/2,c=+t[0][1]+(i-s*(o[1][1]+o[0][1]))/2;return a&&r.clipExtent(a),r.scale(150*s).translate([l,c])},r.precision(y.precision),i&&r.clipAngle(i-y.clipPad);return r}(o),m=[[s.l+s.w*l.x[0],s.t+s.h*(1-l.y[1])],[s.l+s.w*l.x[1],s.t+s.h*(1-l.y[0])]],v=o.center||{},x=c.rotation||{},b=u.range||[],_=f.range||[];if(o.fitbounds){p._length=m[1][0]-m[0][0],d._length=m[1][1]-m[0][1],p.range=h(r,p),d.range=h(r,d);var w=(p.range[0]+p.range[1])/2,T=(d.range[0]+d.range[1])/2;if(o._isScoped)v={lon:w,lat:T};else if(o._isClipped){v={lon:w,lat:T},x={lon:w,lat:T,roll:x.roll};var M=c.type,A=y.lonaxisSpan[M]/2||180,S=y.lataxisSpan[M]/2||90;b=[w-A,w+A],_=[T-S,T+S]}else v={lon:w,lat:T},x={lon:w,lat:x.lat,roll:x.roll}}g.center([v.lon-x.lon,v.lat-x.lat]).rotate([-x.lon,-x.lat,x.roll]).parallels(c.parallels);var E=k(b,_);g.fitExtent(m,E);var C=this.bounds=g.getBounds(E),L=this.fitScale=g.scale(),I=g.translate();if(!isFinite(C[0][0])||!isFinite(C[0][1])||!isFinite(C[1][0])||!isFinite(C[1][1])||isNaN(I[0])||isNaN(I[0])){for(var P=[\"fitbounds\",\"projection.rotation\",\"center\",\"lonaxis.range\",\"lataxis.range\"],z=\"Invalid geo settings, relayout'ing to default view.\",O={},D=0;D-1&&m(n.event,a,[r.xaxis],[r.yaxis],r.id,f),l.indexOf(\"event\")>-1&&c.click(a,n.event))}))}function h(t){return r.projection.invert([t[0]+r.xaxis._offset,t[1]+r.yaxis._offset])}},T.makeFramework=function(){var t=this,e=t.graphDiv,r=e._fullLayout,i=\"clip\"+r._uid+t.id;t.clipDef=r._clips.append(\"clipPath\").attr(\"id\",i),t.clipRect=t.clipDef.append(\"rect\"),t.framework=n.select(t.container).append(\"g\").attr(\"class\",\"geo \"+t.id).call(l.setClipUrl,i,e),t.project=function(e){var r=t.projection(e);return r?[r[0]-t.xaxis._offset,r[1]-t.yaxis._offset]:[null,null]},t.xaxis={_id:\"x\",c2p:function(e){return t.project(e)[0]}},t.yaxis={_id:\"y\",c2p:function(e){return t.project(e)[1]}},t.mockAxis={type:\"linear\",showexponent:\"all\",exponentformat:\"B\"},f.setConvert(t.mockAxis,r)},T.saveViewInitial=function(t){var e,r=t.center||{},n=t.projection,i=n.rotation||{};this.viewInitial={fitbounds:t.fitbounds,\"projection.scale\":n.scale},e=t._isScoped?{\"center.lon\":r.lon,\"center.lat\":r.lat}:t._isClipped?{\"projection.rotation.lon\":i.lon,\"projection.rotation.lat\":i.lat}:{\"center.lon\":r.lon,\"center.lat\":r.lat,\"projection.rotation.lon\":i.lon},a.extendFlat(this.viewInitial,e)},T.render=function(){var t,e=this.projection,r=e.getPath();function n(t){var r=e(t.lonlat);return r?o(r[0],r[1]):null}function i(t){return e.isLonLatOverEdges(t.lonlat)?\"none\":null}for(t in this.basePaths)this.basePaths[t].attr(\"d\",r);for(t in this.dataPaths)this.dataPaths[t].attr(\"d\",(function(t){return r(t.geojson)}));for(t in this.dataPoints)this.dataPoints[t].attr(\"display\",i).attr(\"transform\",n)}},{\"../../components/color\":643,\"../../components/dragelement\":662,\"../../components/drawing\":665,\"../../components/fx\":683,\"../../lib\":778,\"../../lib/geo_location_utils\":771,\"../../lib/topojson_utils\":806,\"../../registry\":911,\"../cartesian/autorange\":827,\"../cartesian/axes\":828,\"../cartesian/select\":847,\"../plots\":891,\"./constants\":858,\"./projections\":863,\"./zoom\":864,d3:169,\"topojson-client\":579}],860:[function(t,e,r){\"use strict\";var n=t(\"../../plots/get_data\").getSubplotCalcData,i=t(\"../../lib\").counterRegex,a=t(\"./geo\"),o=\"geo\",s=i(o),l={};l.geo={valType:\"subplotid\",dflt:o,editType:\"calc\"},e.exports={attr:o,name:o,idRoot:o,idRegex:s,attrRegex:s,attributes:l,layoutAttributes:t(\"./layout_attributes\"),supplyLayoutDefaults:t(\"./layout_defaults\"),plot:function(t){for(var e=t._fullLayout,r=t.calcdata,i=e._subplots.geo,s=0;s0&&L<0&&(L+=360);var I,P,z,O=(C+L)/2;if(!p){var D=d?f.projRotate:[O,0,0];I=r(\"projection.rotation.lon\",D[0]),r(\"projection.rotation.lat\",D[1]),r(\"projection.rotation.roll\",D[2]),r(\"showcoastlines\",!d&&y)&&(r(\"coastlinecolor\"),r(\"coastlinewidth\")),r(\"showocean\",!!y&&void 0)&&r(\"oceancolor\")}(p?(P=-96.6,z=38.7):(P=d?O:I,z=(E[0]+E[1])/2),r(\"center.lon\",P),r(\"center.lat\",z),g)&&r(\"projection.parallels\",f.projParallels||[0,60]);r(\"projection.scale\"),r(\"showland\",!!y&&void 0)&&r(\"landcolor\"),r(\"showlakes\",!!y&&void 0)&&r(\"lakecolor\"),r(\"showrivers\",!!y&&void 0)&&(r(\"rivercolor\"),r(\"riverwidth\")),r(\"showcountries\",d&&\"usa\"!==u&&y)&&(r(\"countrycolor\"),r(\"countrywidth\")),(\"usa\"===u||\"north america\"===u&&50===c)&&(r(\"showsubunits\",y),r(\"subunitcolor\"),r(\"subunitwidth\")),d||r(\"showframe\",y)&&(r(\"framecolor\"),r(\"framewidth\")),r(\"bgcolor\"),r(\"fitbounds\")&&(delete e.projection.scale,d?(delete e.center.lon,delete e.center.lat):m?(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon,delete e.projection.rotation.lat,delete e.lonaxis.range,delete e.lataxis.range):(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon))}e.exports=function(t,e,r){i(t,e,r,{type:\"geo\",attributes:s,handleDefaults:c,fullData:r,partition:\"y\"})}},{\"../../lib\":778,\"../get_data\":865,\"../subplot_defaults\":905,\"./constants\":858,\"./layout_attributes\":861}],863:[function(t,e,r){\"use strict\";e.exports=function(t){function e(t,e){return{type:\"Feature\",id:t.id,properties:t.properties,geometry:r(t.geometry,e)}}function r(e,n){if(!e)return null;if(\"GeometryCollection\"===e.type)return{type:\"GeometryCollection\",geometries:object.geometries.map((function(t){return r(t,n)}))};if(!c.hasOwnProperty(e.type))return null;var i=c[e.type];return t.geo.stream(e,n(i)),i.result()}t.geo.project=function(t,e){var i=e.stream;if(!i)throw new Error(\"not yet supported\");return(t&&n.hasOwnProperty(t.type)?n[t.type]:r)(t,i)};var n={Feature:e,FeatureCollection:function(t,r){return{type:\"FeatureCollection\",features:t.features.map((function(t){return e(t,r)}))}}},i=[],a=[],o={point:function(t,e){i.push([t,e])},result:function(){var t=i.length?i.length<2?{type:\"Point\",coordinates:i[0]}:{type:\"MultiPoint\",coordinates:i}:null;return i=[],t}},s={lineStart:u,point:function(t,e){i.push([t,e])},lineEnd:function(){i.length&&(a.push(i),i=[])},result:function(){var t=a.length?a.length<2?{type:\"LineString\",coordinates:a[0]}:{type:\"MultiLineString\",coordinates:a}:null;return a=[],t}},l={polygonStart:u,lineStart:u,point:function(t,e){i.push([t,e])},lineEnd:function(){var t=i.length;if(t){do{i.push(i[0].slice())}while(++t<4);a.push(i),i=[]}},polygonEnd:u,result:function(){if(!a.length)return null;var t=[],e=[];return a.forEach((function(r){!function(t){if((e=t.length)<4)return!1;var e,r=0,n=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];for(;++rn^p>n&&r<(h-c)*(n-u)/(p-u)+c&&(i=!i)}return i}(t[0],r))return t.push(e),!0}))||t.push([e])})),a=[],t.length?t.length>1?{type:\"MultiPolygon\",coordinates:t}:{type:\"Polygon\",coordinates:t[0]}:null}},c={Point:o,MultiPoint:o,LineString:s,MultiLineString:s,Polygon:l,MultiPolygon:l,Sphere:l};function u(){}var f=1e-6,h=Math.PI,p=h/2,d=(Math.sqrt(h),h/180),g=180/h;function m(t){return t>1?p:t<-1?-p:Math.asin(t)}function v(t){return t>1?0:t<-1?h:Math.acos(t)}var y=t.geo.projection,x=t.geo.projectionMutator;function b(t,e){var r=(2+p)*Math.sin(e);e/=2;for(var n=0,i=1/0;n<10&&Math.abs(i)>f;n++){var a=Math.cos(e);e-=i=(e+Math.sin(e)*(a+2)-r)/(2*a*(1+a))}return[2/Math.sqrt(h*(4+h))*t*(1+Math.cos(e)),2*Math.sqrt(h/(4+h))*Math.sin(e)]}t.geo.interrupt=function(e){var r,n=[[[[-h,0],[0,p],[h,0]]],[[[-h,0],[0,-p],[h,0]]]];function i(t,r){for(var i=r<0?-1:1,a=n[+(r<0)],o=0,s=a.length-1;oa[o][2][0];++o);var l=e(t-a[o][1][0],r);return l[0]+=e(a[o][1][0],i*r>i*a[o][0][1]?a[o][0][1]:r)[0],l}function a(){r=n.map((function(t){return t.map((function(t){var r,n=e(t[0][0],t[0][1])[0],i=e(t[2][0],t[2][1])[0],a=e(t[1][0],t[0][1])[1],o=e(t[1][0],t[1][1])[1];return a>o&&(r=a,a=o,o=r),[[n,a],[i,o]]}))}))}e.invert&&(i.invert=function(t,a){for(var o=r[+(a<0)],s=n[+(a<0)],l=0,u=o.length;l=0;--i){var p;o=180*(p=n[1][i])[0][0]/h,s=180*p[0][1]/h,c=180*p[1][1]/h,u=180*p[2][0]/h,f=180*p[2][1]/h;r.push(l([[u-e,f-e],[u-e,c+e],[o+e,c+e],[o+e,s-e]],30))}return{type:\"Polygon\",coordinates:[t.merge(r)]}}(),a)},i},o.lobes=function(t){return arguments.length?(n=t.map((function(t){return t.map((function(t){return[[t[0][0]*h/180,t[0][1]*h/180],[t[1][0]*h/180,t[1][1]*h/180],[t[2][0]*h/180,t[2][1]*h/180]]}))})),a(),o):n.map((function(t){return t.map((function(t){return[[180*t[0][0]/h,180*t[0][1]/h],[180*t[1][0]/h,180*t[1][1]/h],[180*t[2][0]/h,180*t[2][1]/h]]}))}))},o},b.invert=function(t,e){var r=.5*e*Math.sqrt((4+h)/h),n=m(r),i=Math.cos(n);return[t/(2/Math.sqrt(h*(4+h))*(1+i)),m((n+r*(i+2))/(2+p))]},(t.geo.eckert4=function(){return y(b)}).raw=b;var _=t.geo.azimuthalEqualArea.raw;function w(t,e){if(arguments.length<2&&(e=t),1===e)return _;if(e===1/0)return T;function r(r,n){var i=_(r/e,n);return i[0]*=t,i}return r.invert=function(r,n){var i=_.invert(r/t,n);return i[0]*=e,i},r}function T(t,e){return[t*Math.cos(e)/Math.cos(e/=2),2*Math.sin(e)]}function k(t,e){return[3*t/(2*h)*Math.sqrt(h*h/3-e*e),e]}function M(t,e){return[t,1.25*Math.log(Math.tan(h/4+.4*e))]}function A(t){return function(e){var r,n=t*Math.sin(e),i=30;do{e-=r=(e+Math.sin(e)-n)/(1+Math.cos(e))}while(Math.abs(r)>f&&--i>0);return e/2}}T.invert=function(t,e){var r=2*m(e/2);return[t*Math.cos(r/2)/Math.cos(r),r]},(t.geo.hammer=function(){var t=2,e=x(w),r=e(t);return r.coefficient=function(r){return arguments.length?e(t=+r):t},r}).raw=w,k.invert=function(t,e){return[2/3*h*t/Math.sqrt(h*h/3-e*e),e]},(t.geo.kavrayskiy7=function(){return y(k)}).raw=k,M.invert=function(t,e){return[t,2.5*Math.atan(Math.exp(.8*e))-.625*h]},(t.geo.miller=function(){return y(M)}).raw=M,A(h);var S=function(t,e,r){var n=A(r);function i(r,i){return[t*r*Math.cos(i=n(i)),e*Math.sin(i)]}return i.invert=function(n,i){var a=m(i/e);return[n/(t*Math.cos(a)),m((2*a+Math.sin(2*a))/r)]},i}(Math.SQRT2/p,Math.SQRT2,h);function E(t,e){var r=e*e,n=r*r;return[t*(.8707-.131979*r+n*(n*(.003971*r-.001529*n)-.013791)),e*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))]}(t.geo.mollweide=function(){return y(S)}).raw=S,E.invert=function(t,e){var r,n=e,i=25;do{var a=n*n,o=a*a;n-=r=(n*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-e)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(Math.abs(r)>f&&--i>0);return[t/(.8707+(a=n*n)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),n]},(t.geo.naturalEarth=function(){return y(E)}).raw=E;var C=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];function L(t,e){var r,n=Math.min(18,36*Math.abs(e)/h),i=Math.floor(n),a=n-i,o=(r=C[i])[0],s=r[1],l=(r=C[++i])[0],c=r[1],u=(r=C[Math.min(19,++i)])[0],f=r[1];return[t*(l+a*(u-o)/2+a*a*(u-2*l+o)/2),(e>0?p:-p)*(c+a*(f-s)/2+a*a*(f-2*c+s)/2)]}function I(t,e){return[t*Math.cos(e),e]}function P(t,e){var r,n=Math.cos(e),i=(r=v(n*Math.cos(t/=2)))?r/Math.sin(r):1;return[2*n*Math.sin(t)*i,Math.sin(e)*i]}function z(t,e){var r=P(t,e);return[(r[0]+t/p)/2,(r[1]+e)/2]}C.forEach((function(t){t[1]*=1.0144})),L.invert=function(t,e){var r=e/p,n=90*r,i=Math.min(18,Math.abs(n/5)),a=Math.max(0,Math.floor(i));do{var o=C[a][1],s=C[a+1][1],l=C[Math.min(19,a+2)][1],c=l-o,u=l-2*s+o,f=2*(Math.abs(r)-s)/c,h=u/c,m=f*(1-h*f*(1-2*h*f));if(m>=0||1===a){n=(e>=0?5:-5)*(m+i);var v,y=50;do{m=(i=Math.min(18,Math.abs(n)/5))-(a=Math.floor(i)),o=C[a][1],s=C[a+1][1],l=C[Math.min(19,a+2)][1],n-=(v=(e>=0?p:-p)*(s+m*(l-o)/2+m*m*(l-2*s+o)/2)-e)*g}while(Math.abs(v)>1e-12&&--y>0);break}}while(--a>=0);var x=C[a][0],b=C[a+1][0],_=C[Math.min(19,a+2)][0];return[t/(b+m*(_-x)/2+m*m*(_-2*b+x)/2),n*d]},(t.geo.robinson=function(){return y(L)}).raw=L,I.invert=function(t,e){return[t/Math.cos(e),e]},(t.geo.sinusoidal=function(){return y(I)}).raw=I,P.invert=function(t,e){if(!(t*t+4*e*e>h*h+f)){var r=t,n=e,i=25;do{var a,o=Math.sin(r),s=Math.sin(r/2),l=Math.cos(r/2),c=Math.sin(n),u=Math.cos(n),p=Math.sin(2*n),d=c*c,g=u*u,m=s*s,y=1-g*l*l,x=y?v(u*l)*Math.sqrt(a=1/y):a=0,b=2*x*u*s-t,_=x*c-e,w=a*(g*m+x*u*l*d),T=a*(.5*o*p-2*x*c*s),k=.25*a*(p*s-x*c*g*o),M=a*(d*l+x*m*u),A=T*k-M*w;if(!A)break;var S=(_*T-b*M)/A,E=(b*k-_*w)/A;r-=S,n-=E}while((Math.abs(S)>f||Math.abs(E)>f)&&--i>0);return[r,n]}},(t.geo.aitoff=function(){return y(P)}).raw=P,z.invert=function(t,e){var r=t,n=e,i=25;do{var a,o=Math.cos(n),s=Math.sin(n),l=Math.sin(2*n),c=s*s,u=o*o,h=Math.sin(r),d=Math.cos(r/2),g=Math.sin(r/2),m=g*g,y=1-u*d*d,x=y?v(o*d)*Math.sqrt(a=1/y):a=0,b=.5*(2*x*o*g+r/p)-t,_=.5*(x*s+n)-e,w=.5*a*(u*m+x*o*d*c)+.5/p,T=a*(h*l/4-x*s*g),k=.125*a*(l*g-x*s*u*h),M=.5*a*(c*d+x*m*o)+.5,A=T*k-M*w,S=(_*T-b*M)/A,E=(b*k-_*w)/A;r-=S,n-=E}while((Math.abs(S)>f||Math.abs(E)>f)&&--i>0);return[r,n]},(t.geo.winkel3=function(){return y(z)}).raw=z}},{}],864:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../lib\"),a=t(\"../../registry\"),o=Math.PI/180,s=180/Math.PI,l={cursor:\"pointer\"},c={cursor:\"auto\"};function u(t,e){return n.behavior.zoom().translate(e.translate()).scale(e.scale())}function f(t,e,r){var n=t.id,o=t.graphDiv,s=o.layout,l=s[n],c=o._fullLayout,u=c[n],f={},h={};function p(t,e){f[n+\".\"+t]=i.nestedProperty(l,t).get(),a.call(\"_storeDirectGUIEdit\",s,c._preGUI,f);var r=i.nestedProperty(u,t);r.get()!==e&&(r.set(e),i.nestedProperty(l,t).set(e),h[n+\".\"+t]=e)}r(p),p(\"projection.scale\",e.scale()/t.fitScale),p(\"fitbounds\",!1),o.emit(\"plotly_relayout\",h)}function h(t,e){var r=u(0,e);function i(r){var n=e.invert(t.midPt);r(\"center.lon\",n[0]),r(\"center.lat\",n[1])}return r.on(\"zoomstart\",(function(){n.select(this).style(l)})).on(\"zoom\",(function(){e.scale(n.event.scale).translate(n.event.translate),t.render();var r=e.invert(t.midPt);t.graphDiv.emit(\"plotly_relayouting\",{\"geo.projection.scale\":e.scale()/t.fitScale,\"geo.center.lon\":r[0],\"geo.center.lat\":r[1]})})).on(\"zoomend\",(function(){n.select(this).style(c),f(t,e,i)})),r}function p(t,e){var r,i,a,o,s,h,p,d,g,m=u(0,e);function v(t){return e.invert(t)}function y(r){var n=e.rotate(),i=e.invert(t.midPt);r(\"projection.rotation.lon\",-n[0]),r(\"center.lon\",i[0]),r(\"center.lat\",i[1])}return m.on(\"zoomstart\",(function(){n.select(this).style(l),r=n.mouse(this),i=e.rotate(),a=e.translate(),o=i,s=v(r)})).on(\"zoom\",(function(){if(h=n.mouse(this),function(t){var r=v(t);if(!r)return!0;var n=e(r);return Math.abs(n[0]-t[0])>2||Math.abs(n[1]-t[1])>2}(r))return m.scale(e.scale()),void m.translate(e.translate());e.scale(n.event.scale),e.translate([a[0],n.event.translate[1]]),s?v(h)&&(d=v(h),p=[o[0]+(d[0]-s[0]),i[1],i[2]],e.rotate(p),o=p):s=v(r=h),g=!0,t.render();var l=e.rotate(),c=e.invert(t.midPt);t.graphDiv.emit(\"plotly_relayouting\",{\"geo.projection.scale\":e.scale()/t.fitScale,\"geo.center.lon\":c[0],\"geo.center.lat\":c[1],\"geo.projection.rotation.lon\":-l[0]})})).on(\"zoomend\",(function(){n.select(this).style(c),g&&f(t,e,y)})),m}function d(t,e){var r,i={r:e.rotate(),k:e.scale()},a=u(0,e),o=function(t){var e=0,r=arguments.length,i=[];for(;++ed?(a=(f>0?90:-90)-p,i=0):(a=Math.asin(f/d)*s-p,i=Math.sqrt(d*d-f*f));var g=180-a-2*p,m=(Math.atan2(h,u)-Math.atan2(c,i))*s,v=(Math.atan2(h,u)-Math.atan2(c,-i))*s;return b(r[0],r[1],a,m)<=b(r[0],r[1],g,v)?[a,m,r[2]]:[g,v,r[2]]}function b(t,e,r,n){var i=_(r-t),a=_(n-e);return Math.sqrt(i*i+a*a)}function _(t){return(t%360+540)%360-180}function w(t,e,r){var n=r*o,i=t.slice(),a=0===e?1:0,s=2===e?1:2,l=Math.cos(n),c=Math.sin(n);return i[a]=t[a]*l-t[s]*c,i[s]=t[s]*l+t[a]*c,i}function T(t){return[Math.atan2(2*(t[0]*t[1]+t[2]*t[3]),1-2*(t[1]*t[1]+t[2]*t[2]))*s,Math.asin(Math.max(-1,Math.min(1,2*(t[0]*t[2]-t[3]*t[1]))))*s,Math.atan2(2*(t[0]*t[3]+t[1]*t[2]),1-2*(t[2]*t[2]+t[3]*t[3]))*s]}function k(t,e){for(var r=0,n=0,i=t.length;nMath.abs(s)?(c.boxEnd[1]=c.boxStart[1]+Math.abs(a)*_*(s>=0?1:-1),c.boxEnd[1]l[3]&&(c.boxEnd[1]=l[3],c.boxEnd[0]=c.boxStart[0]+(l[3]-c.boxStart[1])/Math.abs(_))):(c.boxEnd[0]=c.boxStart[0]+Math.abs(s)/_*(a>=0?1:-1),c.boxEnd[0]l[2]&&(c.boxEnd[0]=l[2],c.boxEnd[1]=c.boxStart[1]+(l[2]-c.boxStart[0])*Math.abs(_)))}}else c.boxEnabled?(a=c.boxStart[0]!==c.boxEnd[0],s=c.boxStart[1]!==c.boxEnd[1],a||s?(a&&(m(0,c.boxStart[0],c.boxEnd[0]),t.xaxis.autorange=!1),s&&(m(1,c.boxStart[1],c.boxEnd[1]),t.yaxis.autorange=!1),t.relayoutCallback()):t.glplot.setDirty(),c.boxEnabled=!1,c.boxInited=!1):c.boxInited&&(c.boxInited=!1);break;case\"pan\":c.boxEnabled=!1,c.boxInited=!1,e?(c.panning||(c.dragStart[0]=n,c.dragStart[1]=i),Math.abs(c.dragStart[0]-n).999&&(g=\"turntable\"):g=\"turntable\")}else g=\"turntable\";r(\"dragmode\",g),r(\"hovermode\",n.getDfltFromLayout(\"hovermode\"))}e.exports=function(t,e,r){var i=e._basePlotModules.length>1;o(t,e,r,{type:\"gl3d\",attributes:l,handleDefaults:u,fullLayout:e,font:e.font,fullData:r,getDfltFromLayout:function(e){if(!i)return n.validate(t[e],l[e])?t[e]:void 0},autotypenumbersDflt:e.autotypenumbers,paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},{\"../../../components/color\":643,\"../../../lib\":778,\"../../../registry\":911,\"../../get_data\":865,\"../../subplot_defaults\":905,\"./axis_defaults\":873,\"./layout_attributes\":876}],876:[function(t,e,r){\"use strict\";var n=t(\"./axis_attributes\"),i=t(\"../../domain\").attributes,a=t(\"../../../lib/extend\").extendFlat,o=t(\"../../../lib\").counterRegex;function s(t,e,r){return{x:{valType:\"number\",dflt:t,editType:\"camera\"},y:{valType:\"number\",dflt:e,editType:\"camera\"},z:{valType:\"number\",dflt:r,editType:\"camera\"},editType:\"camera\"}}e.exports={_arrayAttrRegexps:[o(\"scene\",\".annotations\",!0)],bgcolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\",editType:\"plot\"},camera:{up:a(s(0,0,1),{}),center:a(s(0,0,0),{}),eye:a(s(1.25,1.25,1.25),{}),projection:{type:{valType:\"enumerated\",values:[\"perspective\",\"orthographic\"],dflt:\"perspective\",editType:\"calc\"},editType:\"calc\"},editType:\"camera\"},domain:i({name:\"scene\",editType:\"plot\"}),aspectmode:{valType:\"enumerated\",values:[\"auto\",\"cube\",\"data\",\"manual\"],dflt:\"auto\",editType:\"plot\",impliedEdits:{\"aspectratio.x\":void 0,\"aspectratio.y\":void 0,\"aspectratio.z\":void 0}},aspectratio:{x:{valType:\"number\",min:0,editType:\"plot\",impliedEdits:{\"^aspectmode\":\"manual\"}},y:{valType:\"number\",min:0,editType:\"plot\",impliedEdits:{\"^aspectmode\":\"manual\"}},z:{valType:\"number\",min:0,editType:\"plot\",impliedEdits:{\"^aspectmode\":\"manual\"}},editType:\"plot\",impliedEdits:{aspectmode:\"manual\"}},xaxis:n,yaxis:n,zaxis:n,dragmode:{valType:\"enumerated\",values:[\"orbit\",\"turntable\",\"zoom\",\"pan\",!1],editType:\"plot\"},hovermode:{valType:\"enumerated\",values:[\"closest\",!1],dflt:\"closest\",editType:\"modebar\"},uirevision:{valType:\"any\",editType:\"none\"},editType:\"plot\",_deprecated:{cameraposition:{valType:\"info_array\",editType:\"camera\"}}}},{\"../../../lib\":778,\"../../../lib/extend\":768,\"../../domain\":855,\"./axis_attributes\":872}],877:[function(t,e,r){\"use strict\";var n=t(\"../../../lib/str2rgbarray\"),i=[\"xaxis\",\"yaxis\",\"zaxis\"];function a(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}a.prototype.merge=function(t){for(var e=0;e<3;++e){var r=t[i[e]];r.visible?(this.enabled[e]=r.showspikes,this.colors[e]=n(r.spikecolor),this.drawSides[e]=r.spikesides,this.lineWidth[e]=r.spikethickness):(this.enabled[e]=!1,this.drawSides[e]=!1)}},e.exports=function(t){var e=new a;return e.merge(t),e}},{\"../../../lib/str2rgbarray\":802}],878:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=t.axesOptions,r=t.glplot.axesPixels,s=t.fullSceneLayout,l=[[],[],[]],c=0;c<3;++c){var u=s[a[c]];if(u._length=(r[c].hi-r[c].lo)*r[c].pixelsPerDataUnit/t.dataScale[c],Math.abs(u._length)===1/0||isNaN(u._length))l[c]=[];else{u._input_range=u.range.slice(),u.range[0]=r[c].lo/t.dataScale[c],u.range[1]=r[c].hi/t.dataScale[c],u._m=1/(t.dataScale[c]*r[c].pixelsPerDataUnit),u.range[0]===u.range[1]&&(u.range[0]-=1,u.range[1]+=1);var f=u.tickmode;if(\"auto\"===u.tickmode){u.tickmode=\"linear\";var h=u.nticks||i.constrain(u._length/40,4,9);n.autoTicks(u,Math.abs(u.range[1]-u.range[0])/h)}for(var p=n.calcTicks(u,{msUTC:!0}),d=0;d/g,\" \"));l[c]=p,u.tickmode=f}}e.ticks=l;for(c=0;c<3;++c){o[c]=.5*(t.glplot.bounds[0][c]+t.glplot.bounds[1][c]);for(d=0;d<2;++d)e.bounds[d][c]=t.glplot.bounds[d][c]}t.contourLevels=function(t){for(var e=new Array(3),r=0;r<3;++r){for(var n=t[r],i=new Array(n.length),a=0;ar.deltaY?1.1:1/1.1,a=t.glplot.getAspectratio();t.glplot.setAspectratio({x:n*a.x,y:n*a.y,z:n*a.z})}i(t)}}),!!c&&{passive:!1}),t.glplot.canvas.addEventListener(\"mousemove\",(function(){if(!1!==t.fullSceneLayout.dragmode&&0!==t.camera.mouseListener.buttons){var e=n();t.graphDiv.emit(\"plotly_relayouting\",e)}})),t.staticMode||t.glplot.canvas.addEventListener(\"webglcontextlost\",(function(r){e&&e.emit&&e.emit(\"plotly_webglcontextlost\",{event:r,layer:t.id})}),!1)),t.glplot.oncontextloss=function(){t.recoverContext()},t.glplot.onrender=function(){t.render()},!0},w.render=function(){var t,e=this,r=e.graphDiv,n=e.svgContainer,i=e.container.getBoundingClientRect();r._fullLayout._calcInverseTransform(r);var a=r._fullLayout._invScaleX,o=r._fullLayout._invScaleY,s=i.width*a,l=i.height*o;n.setAttributeNS(null,\"viewBox\",\"0 0 \"+s+\" \"+l),n.setAttributeNS(null,\"width\",s),n.setAttributeNS(null,\"height\",l),b(e),e.glplot.axes.update(e.axesOptions);for(var c,u=Object.keys(e.traces),h=null,g=e.glplot.selection,m=0;m\")):\"isosurface\"===t.type||\"volume\"===t.type?(k.valueLabel=p.tickText(e._mockAxis,e._mockAxis.d2l(g.traceCoordinate[3]),\"hover\").text,E.push(\"value: \"+k.valueLabel),g.textLabel&&E.push(g.textLabel),_=E.join(\"
\")):_=g.textLabel;var C={x:g.traceCoordinate[0],y:g.traceCoordinate[1],z:g.traceCoordinate[2],data:w._input,fullData:w,curveNumber:w.index,pointNumber:T};d.appendArrayPointValue(C,w,T),t._module.eventData&&(C=w._module.eventData(C,g,w,{},T));var L={points:[C]};e.fullSceneLayout.hovermode&&d.loneHover({trace:w,x:(.5+.5*x[0]/x[3])*s,y:(.5-.5*x[1]/x[3])*l,xLabel:k.xLabel,yLabel:k.yLabel,zLabel:k.zLabel,text:_,name:h.name,color:d.castHoverOption(w,T,\"bgcolor\")||h.color,borderColor:d.castHoverOption(w,T,\"bordercolor\"),fontFamily:d.castHoverOption(w,T,\"font.family\"),fontSize:d.castHoverOption(w,T,\"font.size\"),fontColor:d.castHoverOption(w,T,\"font.color\"),nameLength:d.castHoverOption(w,T,\"namelength\"),textAlign:d.castHoverOption(w,T,\"align\"),hovertemplate:f.castOption(w,T,\"hovertemplate\"),hovertemplateLabels:f.extendFlat({},C,k),eventData:[C]},{container:n,gd:r}),g.buttons&&g.distance<5?r.emit(\"plotly_click\",L):r.emit(\"plotly_hover\",L),c=L}else d.loneUnhover(n),r.emit(\"plotly_unhover\",c);e.drawAnnotations(e)},w.recoverContext=function(){var t=this;t.glplot.dispose();var e=function(){t.glplot.gl.isContextLost()?requestAnimationFrame(e):t.initializeGLPlot()?t.plot.apply(t,t.plotArgs):f.error(\"Catastrophic and unrecoverable WebGL error. Context lost.\")};requestAnimationFrame(e)};var k=[\"xaxis\",\"yaxis\",\"zaxis\"];function M(t,e,r){for(var n=t.fullSceneLayout,i=0;i<3;i++){var a=k[i],o=a.charAt(0),s=n[a],l=e[o],c=e[o+\"calendar\"],u=e[\"_\"+o+\"length\"];if(f.isArrayOrTypedArray(l))for(var h,p=0;p<(u||l.length);p++)if(f.isArrayOrTypedArray(l[p]))for(var d=0;dm[1][a])m[0][a]=-1,m[1][a]=1;else{var C=m[1][a]-m[0][a];m[0][a]-=C/32,m[1][a]+=C/32}if(\"reversed\"===s.autorange){var L=m[0][a];m[0][a]=m[1][a],m[1][a]=L}}else{var I=s.range;m[0][a]=s.r2l(I[0]),m[1][a]=s.r2l(I[1])}m[0][a]===m[1][a]&&(m[0][a]-=1,m[1][a]+=1),v[a]=m[1][a]-m[0][a],this.glplot.setBounds(a,{min:m[0][a]*h[a],max:m[1][a]*h[a]})}var P=c.aspectmode;if(\"cube\"===P)d=[1,1,1];else if(\"manual\"===P){var z=c.aspectratio;d=[z.x,z.y,z.z]}else{if(\"auto\"!==P&&\"data\"!==P)throw new Error(\"scene.js aspectRatio was not one of the enumerated types\");var O=[1,1,1];for(a=0;a<3;++a){var D=y[l=(s=c[k[a]]).type];O[a]=Math.pow(D.acc,1/D.count)/h[a]}d=\"data\"===P||Math.max.apply(null,O)/Math.min.apply(null,O)<=4?O:[1,1,1]}c.aspectratio.x=u.aspectratio.x=d[0],c.aspectratio.y=u.aspectratio.y=d[1],c.aspectratio.z=u.aspectratio.z=d[2],this.glplot.setAspectratio(c.aspectratio),this.viewInitial.aspectratio||(this.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),this.viewInitial.aspectmode||(this.viewInitial.aspectmode=c.aspectmode);var R=c.domain||null,F=e._size||null;if(R&&F){var B=this.container.style;B.position=\"absolute\",B.left=F.l+R.x[0]*F.w+\"px\",B.top=F.t+(1-R.y[1])*F.h+\"px\",B.width=F.w*(R.x[1]-R.x[0])+\"px\",B.height=F.h*(R.y[1]-R.y[0])+\"px\"}this.glplot.redraw()}},w.destroy=function(){this.glplot&&(this.camera.mouseListener.enabled=!1,this.container.removeEventListener(\"wheel\",this.camera.wheelListener),this.camera=null,this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null)},w.getCamera=function(){var t;return this.camera.view.recalcMatrix(this.camera.view.lastT()),{up:{x:(t=this.camera).up[0],y:t.up[1],z:t.up[2]},center:{x:t.center[0],y:t.center[1],z:t.center[2]},eye:{x:t.eye[0],y:t.eye[1],z:t.eye[2]},projection:{type:!0===t._ortho?\"orthographic\":\"perspective\"}}},w.setViewport=function(t){var e,r=t.camera;this.camera.lookAt.apply(this,[[(e=r).eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]]),this.glplot.setAspectratio(t.aspectratio),\"orthographic\"===r.projection.type!==this.camera._ortho&&(this.glplot.redraw(),this.glplot.clearRGBA(),this.glplot.dispose(),this.initializeGLPlot())},w.isCameraChanged=function(t){var e=this.getCamera(),r=f.nestedProperty(t,this.id+\".camera\").get();function n(t,e,r,n){var i=[\"up\",\"center\",\"eye\"],a=[\"x\",\"y\",\"z\"];return e[i[r]]&&t[i[r]][a[n]]===e[i[r]][a[n]]}var i=!1;if(void 0===r)i=!0;else{for(var a=0;a<3;a++)for(var o=0;o<3;o++)if(!n(e,r,a,o)){i=!0;break}(!r.projection||e.projection&&e.projection.type!==r.projection.type)&&(i=!0)}return i},w.isAspectChanged=function(t){var e=this.glplot.getAspectratio(),r=f.nestedProperty(t,this.id+\".aspectratio\").get();return void 0===r||r.x!==e.x||r.y!==e.y||r.z!==e.z},w.saveLayout=function(t){var e,r,n,i,a,o,s=this.fullLayout,l=this.isCameraChanged(t),c=this.isAspectChanged(t),h=l||c;if(h){var p={};if(l&&(e=this.getCamera(),n=(r=f.nestedProperty(t,this.id+\".camera\")).get(),p[this.id+\".camera\"]=n),c&&(i=this.glplot.getAspectratio(),o=(a=f.nestedProperty(t,this.id+\".aspectratio\")).get(),p[this.id+\".aspectratio\"]=o),u.call(\"_storeDirectGUIEdit\",t,s._preGUI,p),l)r.set(e),f.nestedProperty(s,this.id+\".camera\").set(e);if(c)a.set(i),f.nestedProperty(s,this.id+\".aspectratio\").set(i),this.glplot.redraw()}return h},w.updateFx=function(t,e){var r=this.camera;if(r)if(\"orbit\"===t)r.mode=\"orbit\",r.keyBindingMode=\"rotate\";else if(\"turntable\"===t){r.up=[0,0,1],r.mode=\"turntable\",r.keyBindingMode=\"rotate\";var n=this.graphDiv,i=n._fullLayout,a=this.fullSceneLayout.camera,o=a.up.x,s=a.up.y,l=a.up.z;if(l/Math.sqrt(o*o+s*s+l*l)<.999){var c=this.id+\".camera.up\",h={x:0,y:0,z:1},p={};p[c]=h;var d=n.layout;u.call(\"_storeDirectGUIEdit\",d,i._preGUI,p),a.up=h,f.nestedProperty(d,c).set(h)}}else r.keyBindingMode=t;this.fullSceneLayout.hovermode=e},w.toImage=function(t){t||(t=\"png\"),this.staticMode&&this.container.appendChild(n),this.glplot.redraw();var e=this.glplot.gl,r=e.drawingBufferWidth,i=e.drawingBufferHeight;e.bindFramebuffer(e.FRAMEBUFFER,null);var a=new Uint8Array(r*i*4);e.readPixels(0,0,r,i,e.RGBA,e.UNSIGNED_BYTE,a),function(t,e,r){for(var n=0,i=r-1;n0)for(var s=255/o,l=0;l<3;++l)t[a+l]=Math.min(s*t[a+l],255)}}(a,r,i);var o=document.createElement(\"canvas\");o.width=r,o.height=i;var s,l=o.getContext(\"2d\"),c=l.createImageData(r,i);switch(c.data.set(a),l.putImageData(c,0,0),t){case\"jpeg\":s=o.toDataURL(\"image/jpeg\");break;case\"webp\":s=o.toDataURL(\"image/webp\");break;default:s=o.toDataURL(\"image/png\")}return this.staticMode&&this.container.removeChild(n),s},w.setConvert=function(){for(var t=0;t<3;t++){var e=this.fullSceneLayout[k[t]];p.setConvert(e,this.fullLayout),e.setScale=f.noop}},w.make4thDimension=function(){var t=this.graphDiv._fullLayout;this._mockAxis={type:\"linear\",showexponent:\"all\",exponentformat:\"B\"},p.setConvert(this._mockAxis,t)},e.exports=_},{\"../../components/fx\":683,\"../../lib\":778,\"../../lib/show_no_webgl_msg\":800,\"../../lib/str2rgbarray\":802,\"../../plots/cartesian/axes\":828,\"../../registry\":911,\"./layout/convert\":874,\"./layout/spikes\":877,\"./layout/tick_marks\":878,\"./project\":879,\"gl-plot3d\":321,\"has-passive-events\":441,\"webgl-context\":606}],881:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n){n=n||t.length;for(var i=new Array(n),a=0;a\\xa9 OpenStreetMap',tiles:[\"https://a.tile.openstreetmap.org/{z}/{x}/{y}.png\",\"https://b.tile.openstreetmap.org/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-osm-tiles\",type:\"raster\",source:\"plotly-osm-tiles\",minzoom:0,maxzoom:22}]},\"white-bg\":{id:\"white-bg\",version:8,sources:{},layers:[{id:\"white-bg\",type:\"background\",paint:{\"background-color\":\"#FFFFFF\"},minzoom:0,maxzoom:22}]},\"carto-positron\":{id:\"carto-positron\",version:8,sources:{\"plotly-carto-positron\":{type:\"raster\",attribution:'\\xa9 CARTO',tiles:[\"https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-carto-positron\",type:\"raster\",source:\"plotly-carto-positron\",minzoom:0,maxzoom:22}]},\"carto-darkmatter\":{id:\"carto-darkmatter\",version:8,sources:{\"plotly-carto-darkmatter\":{type:\"raster\",attribution:'\\xa9 CARTO',tiles:[\"https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-carto-darkmatter\",type:\"raster\",source:\"plotly-carto-darkmatter\",minzoom:0,maxzoom:22}]},\"stamen-terrain\":{id:\"stamen-terrain\",version:8,sources:{\"plotly-stamen-terrain\":{type:\"raster\",attribution:'Map tiles by Stamen Design, under CC BY 3.0 | Data by OpenStreetMap, under ODbL.',tiles:[\"https://stamen-tiles.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-stamen-terrain\",type:\"raster\",source:\"plotly-stamen-terrain\",minzoom:0,maxzoom:22}]},\"stamen-toner\":{id:\"stamen-toner\",version:8,sources:{\"plotly-stamen-toner\":{type:\"raster\",attribution:'Map tiles by Stamen Design, under CC BY 3.0 | Data by OpenStreetMap, under ODbL.',tiles:[\"https://stamen-tiles.a.ssl.fastly.net/toner/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-stamen-toner\",type:\"raster\",source:\"plotly-stamen-toner\",minzoom:0,maxzoom:22}]},\"stamen-watercolor\":{id:\"stamen-watercolor\",version:8,sources:{\"plotly-stamen-watercolor\":{type:\"raster\",attribution:'Map tiles by Stamen Design, under CC BY 3.0 | Data by OpenStreetMap, under CC BY SA.',tiles:[\"https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-stamen-watercolor\",type:\"raster\",source:\"plotly-stamen-watercolor\",minzoom:0,maxzoom:22}]}},i=Object.keys(n);e.exports={requiredVersion:\"1.10.1\",styleUrlPrefix:\"mapbox://styles/mapbox/\",styleUrlSuffix:\"v9\",styleValuesMapbox:[\"basic\",\"streets\",\"outdoors\",\"light\",\"dark\",\"satellite\",\"satellite-streets\"],styleValueDflt:\"basic\",stylesNonMapbox:n,styleValuesNonMapbox:i,traceLayerPrefix:\"plotly-trace-layer-\",layoutLayerPrefix:\"plotly-layout-layer-\",wrongVersionErrorMsg:[\"Your custom plotly.js bundle is not using the correct mapbox-gl version\",\"Please install mapbox-gl@1.10.1.\"].join(\"\\n\"),noAccessTokenErrorMsg:[\"Missing Mapbox access token.\",\"Mapbox trace type require a Mapbox access token to be registered.\",\"For example:\",\" Plotly.plot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });\",\"More info here: https://www.mapbox.com/help/define-access-token/\"].join(\"\\n\"),missingStyleErrorMsg:[\"No valid mapbox style found, please set `mapbox.style` to one of:\",i.join(\", \"),\"or register a Mapbox access token to use a Mapbox-served style.\"].join(\"\\n\"),multipleTokensErrorMsg:[\"Set multiple mapbox access token across different mapbox subplot,\",\"using first token found as mapbox-gl does not allow multipleaccess tokens on the same page.\"].join(\"\\n\"),mapOnErrorMsg:\"Mapbox error.\",mapboxLogo:{path0:\"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z\",path1:\"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z\",path2:\"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z\",polygon:\"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34\"},styleRules:{map:\"overflow:hidden;position:relative;\",\"missing-css\":\"display:none;\",canary:\"background-color:salmon;\",\"ctrl-bottom-left\":\"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;\",\"ctrl-bottom-right\":\"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;\",ctrl:\"clear: both; pointer-events: auto; transform: translate(0, 0);\",\"ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner\":\"display: none;\",\"ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner\":\"display: block; margin-top:2px\",\"ctrl-attrib.mapboxgl-compact:hover\":\"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;\",\"ctrl-attrib.mapboxgl-compact::after\":'content: \"\"; cursor: pointer; position: absolute; background-image: url(\\'data:image/svg+xml;charset=utf-8,%3Csvg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"%3E %3Cpath fill=\"%23333333\" fill-rule=\"evenodd\" d=\"M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0\"/%3E %3C/svg%3E\\'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;',\"ctrl-attrib.mapboxgl-compact\":\"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;\",\"ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after\":\"bottom: 0; right: 0\",\"ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after\":\"bottom: 0; left: 0\",\"ctrl-bottom-left .mapboxgl-ctrl\":\"margin: 0 0 10px 10px; float: left;\",\"ctrl-bottom-right .mapboxgl-ctrl\":\"margin: 0 10px 10px 0; float: right;\",\"ctrl-attrib\":\"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px\",\"ctrl-attrib a\":\"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px\",\"ctrl-attrib a:hover\":\"color: inherit; text-decoration: underline;\",\"ctrl-attrib .mapbox-improve-map\":\"font-weight: bold; margin-left: 2px;\",\"attrib-empty\":\"display: none;\",\"ctrl-logo\":'display:block; width: 21px; height: 21px; background-image: url(\\'data:image/svg+xml;charset=utf-8,%3C?xml version=\"1.0\" encoding=\"utf-8\"?%3E %3Csvg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 21 21\" style=\"enable-background:new 0 0 21 21;\" xml:space=\"preserve\"%3E%3Cg transform=\"translate(0,0.01)\"%3E%3Cpath d=\"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z\" style=\"opacity:0.9;fill:%23ffffff;enable-background:new\" class=\"st0\"/%3E%3Cpath d=\"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z\" style=\"opacity:0.35;enable-background:new\" class=\"st1\"/%3E%3Cpath d=\"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z\" style=\"opacity:0.35;enable-background:new\" class=\"st1\"/%3E%3Cpolygon points=\"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 \" style=\"opacity:0.9;fill:%23ffffff;enable-background:new\" class=\"st0\"/%3E%3C/g%3E%3C/svg%3E\\')'}}},{}],884:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){var r=t.split(\" \"),i=r[0],a=r[1],o=n.isArrayOrTypedArray(e)?n.mean(e):e,s=.5+o/100,l=1.5+o/100,c=[\"\",\"\"],u=[0,0];switch(i){case\"top\":c[0]=\"top\",u[1]=-l;break;case\"bottom\":c[0]=\"bottom\",u[1]=l}switch(a){case\"left\":c[1]=\"right\",u[0]=-s;break;case\"right\":c[1]=\"left\",u[0]=s}return{anchor:c[0]&&c[1]?c.join(\"-\"):c[0]?c[0]:c[1]?c[1]:\"center\",offset:u}}},{\"../../lib\":778}],885:[function(t,e,r){\"use strict\";var n=t(\"mapbox-gl\"),i=t(\"../../lib\"),a=i.strTranslate,o=i.strScale,s=t(\"../../plots/get_data\").getSubplotCalcData,l=t(\"../../constants/xmlns_namespaces\"),c=t(\"d3\"),u=t(\"../../components/drawing\"),f=t(\"../../lib/svg_text_utils\"),h=t(\"./mapbox\"),p=r.constants=t(\"./constants\");function d(t){return\"string\"==typeof t&&(-1!==p.styleValuesMapbox.indexOf(t)||0===t.indexOf(\"mapbox://\"))}r.name=\"mapbox\",r.attr=\"subplot\",r.idRoot=\"mapbox\",r.idRegex=r.attrRegex=i.counterRegex(\"mapbox\"),r.attributes={subplot:{valType:\"subplotid\",dflt:\"mapbox\",editType:\"calc\"}},r.layoutAttributes=t(\"./layout_attributes\"),r.supplyLayoutDefaults=t(\"./layout_defaults\"),r.plot=function(t){var e=t._fullLayout,r=t.calcdata,a=e._subplots.mapbox;if(n.version!==p.requiredVersion)throw new Error(p.wrongVersionErrorMsg);var o=function(t,e){var r=t._fullLayout;if(\"\"===t._context.mapboxAccessToken)return\"\";for(var n=[],a=[],o=!1,s=!1,l=0;l1&&i.warn(p.multipleTokensErrorMsg),n[0]):(a.length&&i.log([\"Listed mapbox access token(s)\",a.join(\",\"),\"but did not use a Mapbox map style, ignoring token(s).\"].join(\" \")),\"\")}(t,a);n.accessToken=o;for(var l=0;l_/2){var w=v.split(\"|\").join(\"
\");x.text(w).attr(\"data-unformatted\",w).call(f.convertToTspans,t),b=u.bBox(x.node())}x.attr(\"transform\",a(-3,8-b.height)),y.insert(\"rect\",\".static-attribution\").attr({x:-b.width-6,y:-b.height-3,width:b.width+6,height:b.height+3,fill:\"rgba(255, 255, 255, 0.75)\"});var T=1;b.width+6>_&&(T=_/(b.width+6));var k=[n.l+n.w*h.x[1],n.t+n.h*(1-h.y[0])];y.attr(\"transform\",a(k[0],k[1])+o(T))}},r.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.mapbox,n=0;n0){for(var r=0;r0}function u(t){var e={},r={};switch(t.type){case\"circle\":n.extendFlat(r,{\"circle-radius\":t.circle.radius,\"circle-color\":t.color,\"circle-opacity\":t.opacity});break;case\"line\":n.extendFlat(r,{\"line-width\":t.line.width,\"line-color\":t.color,\"line-opacity\":t.opacity,\"line-dasharray\":t.line.dash});break;case\"fill\":n.extendFlat(r,{\"fill-color\":t.color,\"fill-outline-color\":t.fill.outlinecolor,\"fill-opacity\":t.opacity});break;case\"symbol\":var i=t.symbol,o=a(i.textposition,i.iconsize);n.extendFlat(e,{\"icon-image\":i.icon+\"-15\",\"icon-size\":i.iconsize/10,\"text-field\":i.text,\"text-size\":i.textfont.size,\"text-anchor\":o.anchor,\"text-offset\":o.offset,\"symbol-placement\":i.placement}),n.extendFlat(r,{\"icon-color\":t.color,\"text-color\":i.textfont.color,\"text-opacity\":t.opacity});break;case\"raster\":n.extendFlat(r,{\"raster-fade-duration\":0,\"raster-opacity\":t.opacity})}return{layout:e,paint:r}}l.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=c(t)},l.needsNewImage=function(t){return this.subplot.map.getSource(this.idSource)&&\"image\"===this.sourceType&&\"image\"===t.sourcetype&&(this.source!==t.source||JSON.stringify(this.coordinates)!==JSON.stringify(t.coordinates))},l.needsNewSource=function(t){return this.sourceType!==t.sourcetype||JSON.stringify(this.source)!==JSON.stringify(t.source)||this.layerType!==t.type},l.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==this.subplot.belowLookup[\"layout-\"+this.index]},l.lookupBelow=function(){return this.subplot.belowLookup[\"layout-\"+this.index]},l.updateImage=function(t){this.subplot.map.getSource(this.idSource).updateImage({url:t.source,coordinates:t.coordinates});var e=this.findFollowingMapboxLayerId(this.lookupBelow());null!==e&&this.subplot.map.moveLayer(this.idLayer,e)},l.updateSource=function(t){var e=this.subplot.map;if(e.getSource(this.idSource)&&e.removeSource(this.idSource),this.sourceType=t.sourcetype,this.source=t.source,c(t)){var r=function(t){var e,r=t.sourcetype,n=t.source,a={type:r};\"geojson\"===r?e=\"data\":\"vector\"===r?e=\"string\"==typeof n?\"url\":\"tiles\":\"raster\"===r?(e=\"tiles\",a.tileSize=256):\"image\"===r&&(e=\"url\",a.coordinates=t.coordinates);a[e]=n,t.sourceattribution&&(a.attribution=i(t.sourceattribution));return a}(t);e.addSource(this.idSource,r)}},l.findFollowingMapboxLayerId=function(t){if(\"traces\"===t)for(var e=this.subplot.getMapLayers(),r=0;r1)for(r=0;r-1&&v(e.originalEvent,n,[r.xaxis],[r.yaxis],r.id,t),i.indexOf(\"event\")>-1&&c.click(n,e.originalEvent)}}},_.updateFx=function(t){var e=this,r=e.map,n=e.gd;if(!e.isStatic){var a,o=t.dragmode;a=f(o)?function(t,r){(t.range={})[e.id]=[c([r.xmin,r.ymin]),c([r.xmax,r.ymax])]}:function(t,r,n){(t.lassoPoints={})[e.id]=n.filtered.map(c)};var s=e.dragOptions;e.dragOptions=i.extendDeep(s||{},{dragmode:t.dragmode,element:e.div,gd:n,plotinfo:{id:e.id,domain:t[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis,fillRangeItems:a},xaxes:[e.xaxis],yaxes:[e.yaxis],subplot:e.id}),r.off(\"click\",e.onClickInPanHandler),p(o)||h(o)?(r.dragPan.disable(),r.on(\"zoomstart\",e.clearSelect),e.dragOptions.prepFn=function(t,r,n){d(t,r,n,e.dragOptions,o)},l.init(e.dragOptions)):(r.dragPan.enable(),r.off(\"zoomstart\",e.clearSelect),e.div.onmousedown=null,e.onClickInPanHandler=e.onClickInPanFn(e.dragOptions),r.on(\"click\",e.onClickInPanHandler))}function c(t){var r=e.map.unproject(t);return[r.lng,r.lat]}},_.updateFramework=function(t){var e=t[this.id].domain,r=t._size,n=this.div.style;n.width=r.w*(e.x[1]-e.x[0])+\"px\",n.height=r.h*(e.y[1]-e.y[0])+\"px\",n.left=r.l+e.x[0]*r.w+\"px\",n.top=r.t+(1-e.y[1])*r.h+\"px\",this.xaxis._offset=r.l+e.x[0]*r.w,this.xaxis._length=r.w*(e.x[1]-e.x[0]),this.yaxis._offset=r.t+(1-e.y[1])*r.h,this.yaxis._length=r.h*(e.y[1]-e.y[0])},_.updateLayers=function(t){var e,r=t[this.id].layers,n=this.layerList;if(r.length!==n.length){for(e=0;e=e.width-20?(a[\"text-anchor\"]=\"start\",a.x=5):(a[\"text-anchor\"]=\"end\",a.x=e._paper.attr(\"width\")-7),r.attr(a);var o=r.select(\".js-link-to-tool\"),s=r.select(\".js-link-spacer\"),l=r.select(\".js-sourcelinks\");t._context.showSources&&t._context.showSources(t),t._context.showLink&&function(t,e){e.text(\"\");var r=e.append(\"a\").attr({\"xlink:xlink:href\":\"#\",class:\"link--impt link--embedview\",\"font-weight\":\"bold\"}).text(t._context.linkText+\" \"+String.fromCharCode(187));if(t._context.sendData)r.on(\"click\",(function(){x.sendDataToCloud(t)}));else{var n=window.location.pathname.split(\"/\"),i=window.location.search;r.attr({\"xlink:xlink:show\":\"new\",\"xlink:xlink:href\":\"/\"+n[2].split(\".\")[0]+\"/\"+n[1]+i})}}(t,o),s.text(o.text()&&l.text()?\" - \":\"\")}},x.sendDataToCloud=function(t){var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL;if(e){t.emit(\"plotly_beforeexport\");var r=n.select(t).append(\"div\").attr(\"id\",\"hiddenform\").style(\"display\",\"none\"),i=r.append(\"form\").attr({action:e+\"/external\",method:\"post\",target:\"_blank\"});return i.append(\"input\").attr({type:\"text\",name:\"data\"}).node().value=x.graphJson(t,!1,\"keepdata\"),i.node().submit(),r.remove(),t.emit(\"plotly_afterexport\"),!1}};var w=[\"days\",\"shortDays\",\"months\",\"shortMonths\",\"periods\",\"dateTime\",\"date\",\"time\",\"decimal\",\"thousands\",\"grouping\",\"currency\"],T=[\"year\",\"month\",\"dayMonth\",\"dayMonthYear\"];function k(t,e){var r=t._context.locale;r||(r=\"en-US\");var n=!1,i={};function a(t){for(var r=!0,a=0;a1&&O.length>1){for(o.getComponentMethod(\"grid\",\"sizeDefaults\")(u,l),s=0;s15&&O.length>15&&0===l.shapes.length&&0===l.images.length,l._hasCartesian=l._has(\"cartesian\"),l._hasGeo=l._has(\"geo\"),l._hasGL3D=l._has(\"gl3d\"),l._hasGL2D=l._has(\"gl2d\"),l._hasTernary=l._has(\"ternary\"),l._hasPie=l._has(\"pie\"),x.linkSubplots(h,l,f,a),x.cleanPlot(h,l,f,a);var N=!(!a._has||!a._has(\"gl2d\")),j=!(!l._has||!l._has(\"gl2d\")),U=!(!a._has||!a._has(\"cartesian\"))||N,V=!(!l._has||!l._has(\"cartesian\"))||j;U&&!V?a._bgLayer.remove():V&&!U&&(l._shouldCreateBgLayer=!0),a._zoomlayer&&!t._dragging&&p({_fullLayout:a}),function(t,e){var r,n=[];e.meta&&(r=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var i=0;i0){var f=1-2*s;n=Math.round(f*n),i=Math.round(f*i)}}var h=x.layoutAttributes.width.min,p=x.layoutAttributes.height.min;n1,g=!e.height&&Math.abs(r.height-i)>1;(g||d)&&(d&&(r.width=n),g&&(r.height=i)),t._initialAutoSize||(t._initialAutoSize={width:n,height:i}),x.sanitizeMargins(r)},x.supplyLayoutModuleDefaults=function(t,e,r,n){var i,a,s,l=o.componentsRegistry,u=e._basePlotModules,f=o.subplotsRegistry.cartesian;for(i in l)(s=l[i]).includeBasePlot&&s.includeBasePlot(t,e);for(var h in u.length||u.push(f),e._has(\"cartesian\")&&(o.getComponentMethod(\"grid\",\"contentDefaults\")(t,e),f.finalizeSubplots(t,e)),e._subplots)e._subplots[h].sort(c.subplotSort);for(a=0;a1&&(r.l/=g,r.r/=g)}if(f){var m=(r.t+r.b)/f;m>1&&(r.t/=m,r.b/=m)}var v=void 0!==r.xl?r.xl:r.x,y=void 0!==r.xr?r.xr:r.x,b=void 0!==r.yt?r.yt:r.y,_=void 0!==r.yb?r.yb:r.y;h[e]={l:{val:v,size:r.l+d},r:{val:y,size:r.r+d},b:{val:_,size:r.b+d},t:{val:b,size:r.t+d}},p[e]=1}else delete h[e],delete p[e];if(!n._replotting)return x.doAutoMargin(t)}},x.doAutoMargin=function(t){var e=t._fullLayout,r=e.width,n=e.height;e._size||(e._size={}),C(e);var i=e._size,s=e.margin,l=c.extendFlat({},i),u=s.l,f=s.r,p=s.t,d=s.b,g=e._pushmargin,m=e._pushmarginIds;if(!1!==e.margin.autoexpand){for(var v in g)m[v]||delete g[v];for(var y in g.base={l:{val:0,size:u},r:{val:1,size:f},t:{val:1,size:p},b:{val:0,size:d}},g){var b=g[y].l||{},_=g[y].b||{},w=b.val,T=b.size,k=_.val,M=_.size;for(var A in g){if(a(T)&&g[A].r){var S=g[A].r.val,E=g[A].r.size;if(S>w){var L=(T*S+(E-r)*w)/(S-w),I=(E*(1-w)+(T-r)*(1-S))/(S-w);L+I>u+f&&(u=L,f=I)}}if(a(M)&&g[A].t){var P=g[A].t.val,z=g[A].t.size;if(P>k){var O=(M*P+(z-n)*k)/(P-k),D=(z*(1-k)+(M-n)*(1-P))/(P-k);O+D>d+p&&(d=O,p=D)}}}}}var R=c.constrain(r-s.l-s.r,2,64),F=c.constrain(n-s.t-s.b,2,64),B=Math.max(0,r-R),N=Math.max(0,n-F);if(B){var j=(u+f)/B;j>1&&(u/=j,f/=j)}if(N){var U=(d+p)/N;U>1&&(d/=U,p/=U)}if(i.l=Math.round(u),i.r=Math.round(f),i.t=Math.round(p),i.b=Math.round(d),i.p=Math.round(s.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!e._replotting&&x.didMarginChange(l,i)){\"_redrawFromAutoMarginCount\"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var V=3*(1+Object.keys(m).length);if(e._redrawFromAutoMarginCount0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&t._transitionData._interruptCallbacks.push((function(){return o.call(\"redraw\",t)})),t._transitionData._interruptCallbacks.push((function(){t.emit(\"plotly_transitioninterrupted\",[])}));var a=0,s=0;function l(){return a++,function(){s++,n||s!==a||function(e){if(!t._transitionData)return;(function(t){if(t)for(;t.length;)t.shift()})(t._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return o.call(\"redraw\",t)})).then((function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit(\"plotly_transitioned\",[])})).then(e)}(i)}}r.runFn(l),setTimeout(l())}))}],a=c.syncOrAsync(i,t);return a&&a.then||(a=Promise.resolve()),a.then((function(){return t}))}x.didMarginChange=function(t,e){for(var r=0;r1)return!0}return!1},x.graphJson=function(t,e,r,n,i,a){(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&x.supplyDefaults(t);var o=i?t._fullData:t.data,s=i?t._fullLayout:t.layout,l=(t._transitionData||{})._frames;function u(t,e){if(\"function\"==typeof t)return e?\"_function_\":null;if(c.isPlainObject(t)){var n,i={};return Object.keys(t).sort().forEach((function(a){if(-1===[\"_\",\"[\"].indexOf(a.charAt(0)))if(\"function\"!=typeof t[a]){if(\"keepdata\"===r){if(\"src\"===a.substr(a.length-3))return}else if(\"keepstream\"===r){if(\"string\"==typeof(n=t[a+\"src\"])&&n.indexOf(\":\")>0&&!c.isPlainObject(t.stream))return}else if(\"keepall\"!==r&&\"string\"==typeof(n=t[a+\"src\"])&&n.indexOf(\":\")>0)return;i[a]=u(t[a],e)}else e&&(i[a]=\"_function\")})),i}return Array.isArray(t)?t.map((function(t){return u(t,e)})):c.isTypedArray(t)?c.simpleMap(t,c.identity):c.isJSDate(t)?c.ms2DateTimeLocal(+t):t}var f={data:(o||[]).map((function(t){var r=u(t);return e&&delete r.fit,r}))};if(!e&&(f.layout=u(s),i)){var h=s._size;f.layout.computed={margin:{b:h.b,l:h.l,r:h.r,t:h.t}}}return t.framework&&t.framework.isPolar&&(f=t.framework.getConfig()),l&&(f.frames=u(l)),a&&(f.config=u(t._context,!0)),\"object\"===n?f:JSON.stringify(f)},x.modifyFrames=function(t,e){var r,n,i,a=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r=0;a--)if(s[a].enabled){r._indexToPoints=s[a]._indexToPoints;break}n&&n.calc&&(o=n.calc(t,r))}Array.isArray(o)&&o[0]||(o=[{x:f,y:f}]),o[0].t||(o[0].t={}),o[0].trace=r,d[e]=o}}for(z(l,u,p),i=0;i1e-10?t:0}function h(t,e,r){e=e||0,r=r||0;for(var n=t.length,i=new Array(n),a=0;a0?r:1/0})),i=n.mod(r+1,e.length);return[e[r],e[i]]},findIntersectionXY:c,findXYatLength:function(t,e,r,n){var i=-e*r,a=e*e+1,o=2*(e*i-r),s=i*i+r*r-t*t,l=Math.sqrt(o*o-4*a*s),c=(-o+l)/(2*a),u=(-o-l)/(2*a);return[[c,e*c+i+n],[u,e*u+i+n]]},clampTiny:f,pathPolygon:function(t,e,r,n,i,a){return\"M\"+h(u(t,e,r,n),i,a).join(\"L\")},pathPolygonAnnulus:function(t,e,r,n,i,a,o){var s,l;t=0?h.angularAxis.domain:n.extent(T),E=Math.abs(T[1]-T[0]);M&&!k&&(E=0);var C=S.slice();A&&k&&(C[1]+=E);var L=h.angularAxis.ticksCount||4;L>8&&(L=L/(L/8)+L%8),h.angularAxis.ticksStep&&(L=(C[1]-C[0])/L);var I=h.angularAxis.ticksStep||(C[1]-C[0])/(L*(h.minorTicks+1));w&&(I=Math.max(Math.round(I),1)),C[2]||(C[2]=I);var P=n.range.apply(this,C);if(P=P.map((function(t,e){return parseFloat(t.toPrecision(12))})),s=n.scale.linear().domain(C.slice(0,2)).range(\"clockwise\"===h.direction?[0,360]:[360,0]),u.layout.angularAxis.domain=s.domain(),u.layout.angularAxis.endPadding=A?E:0,\"undefined\"==typeof(t=n.select(this).select(\"svg.chart-root\"))||t.empty()){var z=(new DOMParser).parseFromString(\"' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '\",\"application/xml\"),O=this.appendChild(this.ownerDocument.importNode(z.documentElement,!0));t=n.select(O)}t.select(\".guides-group\").style({\"pointer-events\":\"none\"}),t.select(\".angular.axis-group\").style({\"pointer-events\":\"none\"}),t.select(\".radial.axis-group\").style({\"pointer-events\":\"none\"});var D,R=t.select(\".chart-group\"),F={fill:\"none\",stroke:h.tickColor},B={\"font-size\":h.font.size,\"font-family\":h.font.family,fill:h.font.color,\"text-shadow\":[\"-1px 0px\",\"1px -1px\",\"-1px 1px\",\"1px 1px\"].map((function(t,e){return\" \"+t+\" 0 \"+h.font.outlineColor})).join(\",\")};if(h.showLegend){D=t.select(\".legend-group\").attr({transform:\"translate(\"+[x,h.margin.top]+\")\"}).style({display:\"block\"});var N=p.map((function(t,e){var r=o.util.cloneJson(t);return r.symbol=\"DotPlot\"===t.geometry?t.dotType||\"circle\":\"LinePlot\"!=t.geometry?\"square\":\"line\",r.visibleInLegend=\"undefined\"==typeof t.visibleInLegend||t.visibleInLegend,r.color=\"LinePlot\"===t.geometry?t.strokeColor:t.color,r}));o.Legend().config({data:p.map((function(t,e){return t.name||\"Element\"+e})),legendConfig:i({},o.Legend.defaultConfig().legendConfig,{container:D,elements:N,reverseOrder:h.legend.reverseOrder})})();var j=D.node().getBBox();x=Math.min(h.width-j.width-h.margin.left-h.margin.right,h.height-h.margin.top-h.margin.bottom)/2,x=Math.max(10,x),_=[h.margin.left+x,h.margin.top+x],r.range([0,x]),u.layout.radialAxis.domain=r.domain(),D.attr(\"transform\",\"translate(\"+[_[0]+x,_[1]-x]+\")\")}else D=t.select(\".legend-group\").style({display:\"none\"});t.attr({width:h.width,height:h.height}).style({opacity:h.opacity}),R.attr(\"transform\",\"translate(\"+_+\")\").style({cursor:\"crosshair\"});var U=[(h.width-(h.margin.left+h.margin.right+2*x+(j?j.width:0)))/2,(h.height-(h.margin.top+h.margin.bottom+2*x))/2];if(U[0]=Math.max(0,U[0]),U[1]=Math.max(0,U[1]),t.select(\".outer-group\").attr(\"transform\",\"translate(\"+U+\")\"),h.title&&h.title.text){var V=t.select(\"g.title-group text\").style(B).text(h.title.text),q=V.node().getBBox();V.attr({x:_[0]-q.width/2,y:_[1]-x-20})}var H=t.select(\".radial.axis-group\");if(h.radialAxis.gridLinesVisible){var G=H.selectAll(\"circle.grid-circle\").data(r.ticks(5));G.enter().append(\"circle\").attr({class:\"grid-circle\"}).style(F),G.attr(\"r\",r),G.exit().remove()}H.select(\"circle.outside-circle\").attr({r:x}).style(F);var Y=t.select(\"circle.background-circle\").attr({r:x}).style({fill:h.backgroundColor,stroke:h.stroke});function W(t,e){return s(t)%360+h.orientation}if(h.radialAxis.visible){var X=n.svg.axis().scale(r).ticks(5).tickSize(5);H.call(X).attr({transform:\"rotate(\"+h.radialAxis.orientation+\")\"}),H.selectAll(\".domain\").style(F),H.selectAll(\"g>text\").text((function(t,e){return this.textContent+h.radialAxis.ticksSuffix})).style(B).style({\"text-anchor\":\"start\"}).attr({x:0,y:0,dx:0,dy:0,transform:function(t,e){return\"horizontal\"===h.radialAxis.tickOrientation?\"rotate(\"+-h.radialAxis.orientation+\") translate(\"+[0,B[\"font-size\"]]+\")\":\"translate(\"+[0,B[\"font-size\"]]+\")\"}}),H.selectAll(\"g>line\").style({stroke:\"black\"})}var Z=t.select(\".angular.axis-group\").selectAll(\"g.angular-tick\").data(P),J=Z.enter().append(\"g\").classed(\"angular-tick\",!0);Z.attr({transform:function(t,e){return\"rotate(\"+W(t)+\")\"}}).style({display:h.angularAxis.visible?\"block\":\"none\"}),Z.exit().remove(),J.append(\"line\").classed(\"grid-line\",!0).classed(\"major\",(function(t,e){return e%(h.minorTicks+1)==0})).classed(\"minor\",(function(t,e){return!(e%(h.minorTicks+1)==0)})).style(F),J.selectAll(\".minor\").style({stroke:h.minorTickColor}),Z.select(\"line.grid-line\").attr({x1:h.tickLength?x-h.tickLength:0,x2:x}).style({display:h.angularAxis.gridLinesVisible?\"block\":\"none\"}),J.append(\"text\").classed(\"axis-text\",!0).style(B);var K=Z.select(\"text.axis-text\").attr({x:x+h.labelOffset,dy:a+\"em\",transform:function(t,e){var r=W(t),n=x+h.labelOffset,i=h.angularAxis.tickOrientation;return\"horizontal\"==i?\"rotate(\"+-r+\" \"+n+\" 0)\":\"radial\"==i?r<270&&r>90?\"rotate(180 \"+n+\" 0)\":null:\"rotate(\"+(r<=180&&r>0?-90:90)+\" \"+n+\" 0)\"}}).style({\"text-anchor\":\"middle\",display:h.angularAxis.labelsVisible?\"block\":\"none\"}).text((function(t,e){return e%(h.minorTicks+1)!=0?\"\":w?w[t]+h.angularAxis.ticksSuffix:t+h.angularAxis.ticksSuffix})).style(B);h.angularAxis.rewriteTicks&&K.text((function(t,e){return e%(h.minorTicks+1)!=0?\"\":h.angularAxis.rewriteTicks(this.textContent,e)}));var Q=n.max(R.selectAll(\".angular-tick text\")[0].map((function(t,e){return t.getCTM().e+t.getBBox().width})));D.attr({transform:\"translate(\"+[x+Q,h.margin.top]+\")\"});var $=t.select(\"g.geometry-group\").selectAll(\"g\").size()>0,tt=t.select(\"g.geometry-group\").selectAll(\"g.geometry\").data(p);if(tt.enter().append(\"g\").attr({class:function(t,e){return\"geometry geometry\"+e}}),tt.exit().remove(),p[0]||$){var et=[];p.forEach((function(t,e){var n={};n.radialScale=r,n.angularScale=s,n.container=tt.filter((function(t,r){return r==e})),n.geometry=t.geometry,n.orientation=h.orientation,n.direction=h.direction,n.index=e,et.push({data:t,geometryConfig:n})}));var rt=n.nest().key((function(t,e){return\"undefined\"!=typeof t.data.groupId||\"unstacked\"})).entries(et),nt=[];rt.forEach((function(t,e){\"unstacked\"===t.key?nt=nt.concat(t.values.map((function(t,e){return[t]}))):nt.push(t.values)})),nt.forEach((function(t,e){var r;r=Array.isArray(t)?t[0].geometryConfig.geometry:t.geometryConfig.geometry;var n=t.map((function(t,e){return i(o[r].defaultConfig(),t)}));o[r]().config(n)()}))}var it,at,ot=t.select(\".guides-group\"),st=t.select(\".tooltips-group\"),lt=o.tooltipPanel().config({container:st,fontSize:8})(),ct=o.tooltipPanel().config({container:st,fontSize:8})(),ut=o.tooltipPanel().config({container:st,hasTick:!0})();if(!k){var ft=ot.select(\"line\").attr({x1:0,y1:0,y2:0}).style({stroke:\"grey\",\"pointer-events\":\"none\"});R.on(\"mousemove.angular-guide\",(function(t,e){var r=o.util.getMousePos(Y).angle;ft.attr({x2:-x,transform:\"rotate(\"+r+\")\"}).style({opacity:.5});var n=(r+180+360-h.orientation)%360;it=s.invert(n);var i=o.util.convertToCartesian(x+12,r+180);lt.text(o.util.round(it)).move([i[0]+_[0],i[1]+_[1]])})).on(\"mouseout.angular-guide\",(function(t,e){ot.select(\"line\").style({opacity:0})}))}var ht=ot.select(\"circle\").style({stroke:\"grey\",fill:\"none\"});R.on(\"mousemove.radial-guide\",(function(t,e){var n=o.util.getMousePos(Y).radius;ht.attr({r:n}).style({opacity:.5}),at=r.invert(o.util.getMousePos(Y).radius);var i=o.util.convertToCartesian(n,h.radialAxis.orientation);ct.text(o.util.round(at)).move([i[0]+_[0],i[1]+_[1]])})).on(\"mouseout.radial-guide\",(function(t,e){ht.style({opacity:0}),ut.hide(),lt.hide(),ct.hide()})),t.selectAll(\".geometry-group .mark\").on(\"mouseover.tooltip\",(function(e,r){var i=n.select(this),a=this.style.fill,s=\"black\",l=this.style.opacity||1;if(i.attr({\"data-opacity\":l}),a&&\"none\"!==a){i.attr({\"data-fill\":a}),s=n.hsl(a).darker().toString(),i.style({fill:s,opacity:1});var c={t:o.util.round(e[0]),r:o.util.round(e[1])};k&&(c.t=w[e[0]]);var u=\"t: \"+c.t+\", r: \"+c.r,f=this.getBoundingClientRect(),h=t.node().getBoundingClientRect(),p=[f.left+f.width/2-U[0]-h.left,f.top+f.height/2-U[1]-h.top];ut.config({color:s}).text(u),ut.move(p)}else a=this.style.stroke||\"black\",i.attr({\"data-stroke\":a}),s=n.hsl(a).darker().toString(),i.style({stroke:s,opacity:1})})).on(\"mousemove.tooltip\",(function(t,e){if(0!=n.event.which)return!1;n.select(this).attr(\"data-fill\")&&ut.show()})).on(\"mouseout.tooltip\",(function(t,e){ut.hide();var r=n.select(this),i=r.attr(\"data-fill\");i?r.style({fill:i,opacity:r.attr(\"data-opacity\")}):r.style({stroke:r.attr(\"data-stroke\"),opacity:r.attr(\"data-opacity\")})}))}))}(c),this},h.config=function(t){if(!arguments.length)return l;var e=o.util.cloneJson(t);return e.data.forEach((function(t,e){l.data[e]||(l.data[e]={}),i(l.data[e],o.Axis.defaultConfig().data[0]),i(l.data[e],t)})),i(l.layout,o.Axis.defaultConfig().layout),i(l.layout,e.layout),this},h.getLiveConfig=function(){return u},h.getinputConfig=function(){return c},h.radialScale=function(t){return r},h.angularScale=function(t){return s},h.svg=function(){return t},n.rebind(h,f,\"on\"),h},o.Axis.defaultConfig=function(t,e){return{data:[{t:[1,2,3,4],r:[10,11,12,13],name:\"Line1\",geometry:\"LinePlot\",color:null,strokeDash:\"solid\",strokeColor:null,strokeSize:\"1\",visibleInLegend:!0,opacity:1}],layout:{defaultColorRange:n.scale.category10().range(),title:null,height:450,width:500,margin:{top:40,right:40,bottom:40,left:40},font:{size:12,color:\"gray\",outlineColor:\"white\",family:\"Tahoma, sans-serif\"},direction:\"clockwise\",orientation:0,labelOffset:10,radialAxis:{domain:null,orientation:-45,ticksSuffix:\"\",visible:!0,gridLinesVisible:!0,tickOrientation:\"horizontal\",rewriteTicks:null},angularAxis:{domain:[0,360],ticksSuffix:\"\",visible:!0,gridLinesVisible:!0,labelsVisible:!0,tickOrientation:\"horizontal\",rewriteTicks:null,ticksCount:null,ticksStep:null},minorTicks:0,tickLength:null,tickColor:\"silver\",minorTickColor:\"#eee\",backgroundColor:\"none\",needsEndSpacing:null,showLegend:!0,legend:{reverseOrder:!1},opacity:1}}},o.util={},o.DATAEXTENT=\"dataExtent\",o.AREA=\"AreaChart\",o.LINE=\"LinePlot\",o.DOT=\"DotPlot\",o.BAR=\"BarChart\",o.util._override=function(t,e){for(var r in t)r in e&&(e[r]=t[r])},o.util._extend=function(t,e){for(var r in t)e[r]=t[r]},o.util._rndSnd=function(){return 2*Math.random()-1+(2*Math.random()-1)+(2*Math.random()-1)},o.util.dataFromEquation2=function(t,e){var r=e||6;return n.range(0,360+r,r).map((function(e,r){var n=e*Math.PI/180;return[e,t(n)]}))},o.util.dataFromEquation=function(t,e,r){var i=e||6,a=[],o=[];n.range(0,360+i,i).forEach((function(e,r){var n=e*Math.PI/180,i=t(n);a.push(e),o.push(i)}));var s={t:a,r:o};return r&&(s.name=r),s},o.util.ensureArray=function(t,e){if(\"undefined\"==typeof t)return null;var r=[].concat(t);return n.range(e).map((function(t,e){return r[e]||r[0]}))},o.util.fillArrays=function(t,e,r){return e.forEach((function(e,n){t[e]=o.util.ensureArray(t[e],r)})),t},o.util.cloneJson=function(t){return JSON.parse(JSON.stringify(t))},o.util.validateKeys=function(t,e){\"string\"==typeof e&&(e=e.split(\".\"));var r=e.shift();return t[r]&&(!e.length||objHasKeys(t[r],e))},o.util.sumArrays=function(t,e){return n.zip(t,e).map((function(t,e){return n.sum(t)}))},o.util.arrayLast=function(t){return t[t.length-1]},o.util.arrayEqual=function(t,e){for(var r=Math.max(t.length,e.length,1);r-- >=0&&t[r]===e[r];);return-2===r},o.util.flattenArray=function(t){for(var e=[];!o.util.arrayEqual(e,t);)e=t,t=[].concat.apply([],t);return t},o.util.deduplicate=function(t){return t.filter((function(t,e,r){return r.indexOf(t)==e}))},o.util.convertToCartesian=function(t,e){var r=e*Math.PI/180;return[t*Math.cos(r),t*Math.sin(r)]},o.util.round=function(t,e){var r=e||2,n=Math.pow(10,r);return Math.round(t*n)/n},o.util.getMousePos=function(t){var e=n.mouse(t.node()),r=e[0],i=e[1],a={};return a.x=r,a.y=i,a.pos=e,a.angle=180*(Math.atan2(i,r)+Math.PI)/Math.PI,a.radius=Math.sqrt(r*r+i*i),a},o.util.duplicatesCount=function(t){for(var e,r={},n={},i=0,a=t.length;i0)){var l=n.select(this.parentNode).selectAll(\"path.line\").data([0]);l.enter().insert(\"path\"),l.attr({class:\"line\",d:u(s),transform:function(t,r){return\"rotate(\"+(e.orientation+90)+\")\"},\"pointer-events\":\"none\"}).style({fill:function(t,e){return d.fill(r,i,a)},\"fill-opacity\":0,stroke:function(t,e){return d.stroke(r,i,a)},\"stroke-width\":function(t,e){return d[\"stroke-width\"](r,i,a)},\"stroke-dasharray\":function(t,e){return d[\"stroke-dasharray\"](r,i,a)},opacity:function(t,e){return d.opacity(r,i,a)},display:function(t,e){return d.display(r,i,a)}})}};var f=e.angularScale.range(),h=Math.abs(f[1]-f[0])/o[0].length*Math.PI/180,p=n.svg.arc().startAngle((function(t){return-h/2})).endAngle((function(t){return h/2})).innerRadius((function(t){return e.radialScale(l+(t[2]||0))})).outerRadius((function(t){return e.radialScale(l+(t[2]||0))+e.radialScale(t[1])}));c.arc=function(t,r,i){n.select(this).attr({class:\"mark arc\",d:p,transform:function(t,r){return\"rotate(\"+(e.orientation+s(t[0])+90)+\")\"}})};var d={fill:function(e,r,n){return t[n].data.color},stroke:function(e,r,n){return t[n].data.strokeColor},\"stroke-width\":function(e,r,n){return t[n].data.strokeSize+\"px\"},\"stroke-dasharray\":function(e,n,i){return r[t[i].data.strokeDash]},opacity:function(e,r,n){return t[n].data.opacity},display:function(e,r,n){return\"undefined\"==typeof t[n].data.visible||t[n].data.visible?\"block\":\"none\"}},g=n.select(this).selectAll(\"g.layer\").data(o);g.enter().append(\"g\").attr({class:\"layer\"});var m=g.selectAll(\"path.mark\").data((function(t,e){return t}));m.enter().append(\"path\").attr({class:\"mark\"}),m.style(d).each(c[e.geometryType]),m.exit().remove(),g.exit().remove()}))}return a.config=function(e){return arguments.length?(e.forEach((function(e,r){t[r]||(t[r]={}),i(t[r],o.PolyChart.defaultConfig()),i(t[r],e)})),this):t},a.getColorScale=function(){},n.rebind(a,e,\"on\"),a},o.PolyChart.defaultConfig=function(){return{data:{name:\"geom1\",t:[[1,2,3,4]],r:[[1,2,3,4]],dotType:\"circle\",dotSize:64,dotVisible:!1,barWidth:20,color:\"#ffa500\",strokeSize:1,strokeColor:\"silver\",strokeDash:\"solid\",opacity:1,index:0,visible:!0,visibleInLegend:!0},geometryConfig:{geometry:\"LinePlot\",geometryType:\"arc\",direction:\"clockwise\",orientation:0,container:\"body\",radialScale:null,angularScale:null,colorScale:n.scale.category20()}}},o.BarChart=function(){return o.PolyChart()},o.BarChart.defaultConfig=function(){return{geometryConfig:{geometryType:\"bar\"}}},o.AreaChart=function(){return o.PolyChart()},o.AreaChart.defaultConfig=function(){return{geometryConfig:{geometryType:\"arc\"}}},o.DotPlot=function(){return o.PolyChart()},o.DotPlot.defaultConfig=function(){return{geometryConfig:{geometryType:\"dot\",dotType:\"circle\"}}},o.LinePlot=function(){return o.PolyChart()},o.LinePlot.defaultConfig=function(){return{geometryConfig:{geometryType:\"line\"}}},o.Legend=function(){var t=o.Legend.defaultConfig(),e=n.dispatch(\"hover\");function r(){var e=t.legendConfig,a=t.data.map((function(t,r){return[].concat(t).map((function(t,n){var a=i({},e.elements[r]);return a.name=t,a.color=[].concat(e.elements[r].color)[n],a}))})),o=n.merge(a);o=o.filter((function(t,r){return e.elements[r]&&(e.elements[r].visibleInLegend||\"undefined\"==typeof e.elements[r].visibleInLegend)})),e.reverseOrder&&(o=o.reverse());var s=e.container;(\"string\"==typeof s||s.nodeName)&&(s=n.select(s));var l=o.map((function(t,e){return t.color})),c=e.fontSize,u=null==e.isContinuous?\"number\"==typeof o[0]:e.isContinuous,f=u?e.height:c*o.length,h=s.classed(\"legend-group\",!0).selectAll(\"svg\").data([0]),p=h.enter().append(\"svg\").attr({width:300,height:f+c,xmlns:\"http://www.w3.org/2000/svg\",\"xmlns:xlink\":\"http://www.w3.org/1999/xlink\",version:\"1.1\"});p.append(\"g\").classed(\"legend-axis\",!0),p.append(\"g\").classed(\"legend-marks\",!0);var d=n.range(o.length),g=n.scale[u?\"linear\":\"ordinal\"]().domain(d).range(l),m=n.scale[u?\"linear\":\"ordinal\"]().domain(d)[u?\"range\":\"rangePoints\"]([0,f]);if(u){var v=h.select(\".legend-marks\").append(\"defs\").append(\"linearGradient\").attr({id:\"grad1\",x1:\"0%\",y1:\"0%\",x2:\"0%\",y2:\"100%\"}).selectAll(\"stop\").data(l);v.enter().append(\"stop\"),v.attr({offset:function(t,e){return e/(l.length-1)*100+\"%\"}}).style({\"stop-color\":function(t,e){return t}}),h.append(\"rect\").classed(\"legend-mark\",!0).attr({height:e.height,width:e.colorBandWidth,fill:\"url(#grad1)\"})}else{var y=h.select(\".legend-marks\").selectAll(\"path.legend-mark\").data(o);y.enter().append(\"path\").classed(\"legend-mark\",!0),y.attr({transform:function(t,e){return\"translate(\"+[c/2,m(e)+c/2]+\")\"},d:function(t,e){var r,i,a,o=t.symbol;return a=3*(i=c),\"line\"===(r=o)?\"M\"+[[-i/2,-i/12],[i/2,-i/12],[i/2,i/12],[-i/2,i/12]]+\"Z\":-1!=n.svg.symbolTypes.indexOf(r)?n.svg.symbol().type(r).size(a)():n.svg.symbol().type(\"square\").size(a)()},fill:function(t,e){return g(e)}}),y.exit().remove()}var x=n.svg.axis().scale(m).orient(\"right\"),b=h.select(\"g.legend-axis\").attr({transform:\"translate(\"+[u?e.colorBandWidth:c,c/2]+\")\"}).call(x);return b.selectAll(\".domain\").style({fill:\"none\",stroke:\"none\"}),b.selectAll(\"line\").style({fill:\"none\",stroke:u?e.textColor:\"none\"}),b.selectAll(\"text\").style({fill:e.textColor,\"font-size\":e.fontSize}).text((function(t,e){return o[e].name})),r}return r.config=function(e){return arguments.length?(i(t,e),this):t},n.rebind(r,e,\"on\"),r},o.Legend.defaultConfig=function(t,e){return{data:[\"a\",\"b\",\"c\"],legendConfig:{elements:[{symbol:\"line\",color:\"red\"},{symbol:\"square\",color:\"yellow\"},{symbol:\"diamond\",color:\"limegreen\"}],height:150,colorBandWidth:30,fontSize:12,container:\"body\",isContinuous:null,textColor:\"grey\",reverseOrder:!1}}},o.tooltipPanel=function(){var t,e,r,a={container:null,hasTick:!1,fontSize:12,color:\"white\",padding:5},s=\"tooltip-\"+o.tooltipPanel.uid++,l=10,c=function(){var n=(t=a.container.selectAll(\"g.\"+s).data([0])).enter().append(\"g\").classed(s,!0).style({\"pointer-events\":\"none\",display:\"none\"});return r=n.append(\"path\").style({fill:\"white\",\"fill-opacity\":.9}).attr({d:\"M0 0\"}),e=n.append(\"text\").attr({dx:a.padding+l,dy:.3*+a.fontSize}),c};return c.text=function(i){var o=n.hsl(a.color).l,s=o>=.5?\"#aaa\":\"white\",u=o>=.5?\"black\":\"white\",f=i||\"\";e.style({fill:u,\"font-size\":a.fontSize+\"px\"}).text(f);var h=a.padding,p=e.node().getBBox(),d={fill:a.color,stroke:s,\"stroke-width\":\"2px\"},g=p.width+2*h+l,m=p.height+2*h;return r.attr({d:\"M\"+[[l,-m/2],[l,-m/4],[a.hasTick?0:l,0],[l,m/4],[l,m/2],[g,m/2],[g,-m/2]].join(\"L\")+\"Z\"}).style(d),t.attr({transform:\"translate(\"+[l,-m/2+2*h]+\")\"}),t.style({display:\"block\"}),c},c.move=function(e){if(t)return t.attr({transform:\"translate(\"+[e[0],e[1]]+\")\"}).style({display:\"block\"}),c},c.hide=function(){if(t)return t.style({display:\"none\"}),c},c.show=function(){if(t)return t.style({display:\"block\"}),c},c.config=function(t){return i(a,t),c},c},o.tooltipPanel.uid=1,o.adapter={},o.adapter.plotly=function(){var t={convert:function(t,e){var r={};if(t.data&&(r.data=t.data.map((function(t,r){var n=i({},t);return[[n,[\"marker\",\"color\"],[\"color\"]],[n,[\"marker\",\"opacity\"],[\"opacity\"]],[n,[\"marker\",\"line\",\"color\"],[\"strokeColor\"]],[n,[\"marker\",\"line\",\"dash\"],[\"strokeDash\"]],[n,[\"marker\",\"line\",\"width\"],[\"strokeSize\"]],[n,[\"marker\",\"symbol\"],[\"dotType\"]],[n,[\"marker\",\"size\"],[\"dotSize\"]],[n,[\"marker\",\"barWidth\"],[\"barWidth\"]],[n,[\"line\",\"interpolation\"],[\"lineInterpolation\"]],[n,[\"showlegend\"],[\"visibleInLegend\"]]].forEach((function(t,r){o.util.translator.apply(null,t.concat(e))})),e||delete n.marker,e&&delete n.groupId,e?(\"LinePlot\"===n.geometry?(n.type=\"scatter\",!0===n.dotVisible?(delete n.dotVisible,n.mode=\"lines+markers\"):n.mode=\"lines\"):\"DotPlot\"===n.geometry?(n.type=\"scatter\",n.mode=\"markers\"):\"AreaChart\"===n.geometry?n.type=\"area\":\"BarChart\"===n.geometry&&(n.type=\"bar\"),delete n.geometry):(\"scatter\"===n.type?\"lines\"===n.mode?n.geometry=\"LinePlot\":\"markers\"===n.mode?n.geometry=\"DotPlot\":\"lines+markers\"===n.mode&&(n.geometry=\"LinePlot\",n.dotVisible=!0):\"area\"===n.type?n.geometry=\"AreaChart\":\"bar\"===n.type&&(n.geometry=\"BarChart\"),delete n.mode,delete n.type),n})),!e&&t.layout&&\"stack\"===t.layout.barmode)){var a=o.util.duplicates(r.data.map((function(t,e){return t.geometry})));r.data.forEach((function(t,e){var n=a.indexOf(t.geometry);-1!=n&&(r.data[e].groupId=n)}))}if(t.layout){var s=i({},t.layout);if([[s,[\"plot_bgcolor\"],[\"backgroundColor\"]],[s,[\"showlegend\"],[\"showLegend\"]],[s,[\"radialaxis\"],[\"radialAxis\"]],[s,[\"angularaxis\"],[\"angularAxis\"]],[s.angularaxis,[\"showline\"],[\"gridLinesVisible\"]],[s.angularaxis,[\"showticklabels\"],[\"labelsVisible\"]],[s.angularaxis,[\"nticks\"],[\"ticksCount\"]],[s.angularaxis,[\"tickorientation\"],[\"tickOrientation\"]],[s.angularaxis,[\"ticksuffix\"],[\"ticksSuffix\"]],[s.angularaxis,[\"range\"],[\"domain\"]],[s.angularaxis,[\"endpadding\"],[\"endPadding\"]],[s.radialaxis,[\"showline\"],[\"gridLinesVisible\"]],[s.radialaxis,[\"tickorientation\"],[\"tickOrientation\"]],[s.radialaxis,[\"ticksuffix\"],[\"ticksSuffix\"]],[s.radialaxis,[\"range\"],[\"domain\"]],[s.angularAxis,[\"showline\"],[\"gridLinesVisible\"]],[s.angularAxis,[\"showticklabels\"],[\"labelsVisible\"]],[s.angularAxis,[\"nticks\"],[\"ticksCount\"]],[s.angularAxis,[\"tickorientation\"],[\"tickOrientation\"]],[s.angularAxis,[\"ticksuffix\"],[\"ticksSuffix\"]],[s.angularAxis,[\"range\"],[\"domain\"]],[s.angularAxis,[\"endpadding\"],[\"endPadding\"]],[s.radialAxis,[\"showline\"],[\"gridLinesVisible\"]],[s.radialAxis,[\"tickorientation\"],[\"tickOrientation\"]],[s.radialAxis,[\"ticksuffix\"],[\"ticksSuffix\"]],[s.radialAxis,[\"range\"],[\"domain\"]],[s.font,[\"outlinecolor\"],[\"outlineColor\"]],[s.legend,[\"traceorder\"],[\"reverseOrder\"]],[s,[\"labeloffset\"],[\"labelOffset\"]],[s,[\"defaultcolorrange\"],[\"defaultColorRange\"]]].forEach((function(t,r){o.util.translator.apply(null,t.concat(e))})),e?(\"undefined\"!=typeof s.tickLength&&(s.angularaxis.ticklen=s.tickLength,delete s.tickLength),s.tickColor&&(s.angularaxis.tickcolor=s.tickColor,delete s.tickColor)):(s.angularAxis&&\"undefined\"!=typeof s.angularAxis.ticklen&&(s.tickLength=s.angularAxis.ticklen),s.angularAxis&&\"undefined\"!=typeof s.angularAxis.tickcolor&&(s.tickColor=s.angularAxis.tickcolor)),s.legend&&\"boolean\"!=typeof s.legend.reverseOrder&&(s.legend.reverseOrder=\"normal\"!=s.legend.reverseOrder),s.legend&&\"boolean\"==typeof s.legend.traceorder&&(s.legend.traceorder=s.legend.traceorder?\"reversed\":\"normal\",delete s.legend.reverseOrder),s.margin&&\"undefined\"!=typeof s.margin.t){var l=[\"t\",\"r\",\"b\",\"l\",\"pad\"],c=[\"top\",\"right\",\"bottom\",\"left\",\"pad\"],u={};n.entries(s.margin).forEach((function(t,e){u[c[l.indexOf(t.key)]]=t.value})),s.margin=u}e&&(delete s.needsEndSpacing,delete s.minorTickColor,delete s.minorTicks,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksStep,delete s.angularaxis.rewriteTicks,delete s.angularaxis.nticks,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksStep,delete s.radialaxis.rewriteTicks,delete s.radialaxis.nticks),r.layout=s}return r}};return t}},{\"../../../constants/alignment\":745,\"../../../lib\":778,d3:169}],901:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../../lib\"),a=t(\"../../../components/color\"),o=t(\"./micropolar\"),s=t(\"./undo_manager\"),l=i.extendDeepAll,c=e.exports={};c.framework=function(t){var e,r,i,a,u,f=new s;function h(r,s){return s&&(u=s),n.select(n.select(u).node().parentNode).selectAll(\".svg-container>*:not(.chart-root)\").remove(),e=e?l(e,r):r,i||(i=o.Axis()),a=o.adapter.plotly().convert(e),i.config(a).render(u),t.data=e.data,t.layout=e.layout,c.fillLayout(t),e}return h.isPolar=!0,h.svg=function(){return i.svg()},h.getConfig=function(){return e},h.getLiveConfig=function(){return o.adapter.plotly().convert(i.getLiveConfig(),!0)},h.getLiveScales=function(){return{t:i.angularScale(),r:i.radialScale()}},h.setUndoPoint=function(){var t,n,i=this,a=o.util.cloneJson(e);t=a,n=r,f.add({undo:function(){n&&i(n)},redo:function(){i(t)}}),r=o.util.cloneJson(a)},h.undo=function(){f.undo()},h.redo=function(){f.redo()},h},c.fillLayout=function(t){var e=n.select(t).selectAll(\".plot-container\"),r=e.selectAll(\".svg-container\"),i=t.framework&&t.framework.svg&&t.framework.svg(),o={width:800,height:600,paper_bgcolor:a.background,_container:e,_paperdiv:r,_paper:i};t._fullLayout=l(o,t.layout)}},{\"../../../components/color\":643,\"../../../lib\":778,\"./micropolar\":900,\"./undo_manager\":902,d3:169}],902:[function(t,e,r){\"use strict\";e.exports=function(){var t,e=[],r=-1,n=!1;function i(t,e){return t?(n=!0,t[e](),n=!1,this):this}return{add:function(t){return n||(e.splice(r+1,e.length-r),e.push(t),r=e.length-1),this},setCallback:function(e){t=e},undo:function(){var n=e[r];return n?(i(n,\"undo\"),r-=1,t&&t(n.undo),this):this},redo:function(){var n=e[r+1];return n?(i(n,\"redo\"),r+=1,t&&t(n.redo),this):this},clear:function(){e=[],r=-1},hasUndo:function(){return-1!==r},hasRedo:function(){return r=90||s>90&&l>=450?1:u<=0&&h<=0?0:Math.max(u,h);e=s<=180&&l>=180||s>180&&l>=540?-1:c>=0&&f>=0?0:Math.min(c,f);r=s<=270&&l>=270||s>270&&l>=630?-1:u>=0&&h>=0?0:Math.min(u,h);n=l>=360?1:c<=0&&f<=0?0:Math.max(c,f);return[e,r,n,i]}(p),b=x[2]-x[0],_=x[3]-x[1],w=h/f,T=Math.abs(_/b);w>T?(d=f,y=(h-(g=f*T))/n.h/2,m=[o[0],o[1]],v=[s[0]+y,s[1]-y]):(g=h,y=(f-(d=h/T))/n.w/2,m=[o[0]+y,o[1]-y],v=[s[0],s[1]]),this.xLength2=d,this.yLength2=g,this.xDomain2=m,this.yDomain2=v;var k=this.xOffset2=n.l+n.w*m[0],M=this.yOffset2=n.t+n.h*(1-v[1]),A=this.radius=d/b,S=this.innerRadius=e.hole*A,E=this.cx=k-A*x[0],C=this.cy=M+A*x[3],P=this.cxx=E-k,z=this.cyy=C-M;this.radialAxis=this.mockAxis(t,e,i,{_id:\"x\",side:{counterclockwise:\"top\",clockwise:\"bottom\"}[i.side],_realSide:i.side,domain:[S/n.w,A/n.w]}),this.angularAxis=this.mockAxis(t,e,a,{side:\"right\",domain:[0,Math.PI],autorange:!1}),this.doAutoRange(t,e),this.updateAngularAxis(t,e),this.updateRadialAxis(t,e),this.updateRadialAxisTitle(t,e),this.xaxis=this.mockCartesianAxis(t,e,{_id:\"x\",domain:m}),this.yaxis=this.mockCartesianAxis(t,e,{_id:\"y\",domain:v});var O=this.pathSubplot();this.clipPaths.forTraces.select(\"path\").attr(\"d\",O).attr(\"transform\",l(P,z)),r.frontplot.attr(\"transform\",l(k,M)).call(u.setClipUrl,this._hasClipOnAxisFalse?null:this.clipIds.forTraces,this.gd),r.bg.attr(\"d\",O).attr(\"transform\",l(E,C)).call(c.fill,e.bgcolor)},O.mockAxis=function(t,e,r,n){var i=o.extendFlat({},r,n);return d(i,e,t),i},O.mockCartesianAxis=function(t,e,r){var n=this,i=r._id,a=o.extendFlat({type:\"linear\"},r);p(a,t);var s={x:[0,2],y:[1,3]};return a.setRange=function(){var t=n.sectorBBox,r=s[i],o=n.radialAxis._rl,l=(o[1]-o[0])/(1-e.hole);a.range=[t[r[0]]*l,t[r[1]]*l]},a.isPtWithinRange=\"x\"===i?function(t){return n.isPtInside(t)}:function(){return!0},a.setRange(),a.setScale(),a},O.doAutoRange=function(t,e){var r=this.gd,n=this.radialAxis,i=e.radialaxis;n.setScale(),g(r,n);var a=n.range;i.range=a.slice(),i._input.range=a.slice(),n._rl=[n.r2l(a[0],null,\"gregorian\"),n.r2l(a[1],null,\"gregorian\")]},O.updateRadialAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,u=r.innerRadius,f=r.cx,p=r.cy,d=e.radialaxis,g=L(e.sector[0],360),m=r.radialAxis,v=u90&&g<=270&&(m.tickangle=180);var y=function(t){return l(m.l2p(t.x)+u,0)},x=D(d);if(r.radialTickLayout!==x&&(i[\"radial-axis\"].selectAll(\".xtick\").remove(),r.radialTickLayout=x),v){m.setScale();var b=h.calcTicks(m),_=h.clipEnds(m,b),w=h.getTickSigns(m)[2];h.drawTicks(n,m,{vals:b,layer:i[\"radial-axis\"],path:h.makeTickPath(m,0,w),transFn:y,crisp:!1}),h.drawGrid(n,m,{vals:_,layer:i[\"radial-grid\"],path:function(t){return r.pathArc(m.r2p(t.x)+u)},transFn:o.noop,crisp:!1}),h.drawLabels(n,m,{vals:b,layer:i[\"radial-axis\"],transFn:y,labelFns:h.makeLabelFns(m,0)})}var T=r.radialAxisAngle=r.vangles?P(R(I(d.angle),r.vangles)):d.angle,k=l(f,p),M=k+s(-T);F(i[\"radial-axis\"],v&&(d.showticklabels||d.ticks),{transform:M}),F(i[\"radial-grid\"],v&&d.showgrid,{transform:k}),F(i[\"radial-line\"].select(\"line\"),v&&d.showline,{x1:u,y1:0,x2:a,y2:0,transform:M}).attr(\"stroke-width\",d.linewidth).call(c.stroke,d.linecolor)},O.updateRadialAxisTitle=function(t,e,r){var n=this.gd,i=this.radius,a=this.cx,o=this.cy,s=e.radialaxis,l=this.id+\"title\",c=void 0!==r?r:this.radialAxisAngle,f=I(c),h=Math.cos(f),p=Math.sin(f),d=0;if(s.title){var g=u.bBox(this.layers[\"radial-axis\"].node()).height,m=s.title.font.size;d=\"counterclockwise\"===s.side?-g-.4*m:g+.8*m}this.layers[\"radial-axis-title\"]=x.draw(n,l,{propContainer:s,propName:this.id+\".radialaxis.title\",placeholder:C(n,\"Click to enter radial axis title\"),attributes:{x:a+i/2*h+d*p,y:o-i/2*p+d*h,\"text-anchor\":\"middle\"},transform:{rotate:-c}})},O.updateAngularAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,u=r.innerRadius,f=r.cx,p=r.cy,d=e.angularaxis,g=r.angularAxis;r.fillViewInitialKey(\"angularaxis.rotation\",d.rotation),g.setGeometry(),g.setScale();var m=function(t){return g.t2g(t.x)};\"linear\"===g.type&&\"radians\"===g.thetaunit&&(g.tick0=P(g.tick0),g.dtick=P(g.dtick));var v=function(t){return l(f+a*Math.cos(t),p-a*Math.sin(t))},y=h.makeLabelFns(g,0).labelStandoff,x={xFn:function(t){var e=m(t);return Math.cos(e)*y},yFn:function(t){var e=m(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(y+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*A)},anchorFn:function(t){var e=m(t),r=Math.cos(e);return Math.abs(r)<.1?\"middle\":r>0?\"start\":\"end\"},heightFn:function(t,e,r){var n=m(t);return-.5*(1+Math.sin(n))*r}},b=D(d);r.angularTickLayout!==b&&(i[\"angular-axis\"].selectAll(\".\"+g._id+\"tick\").remove(),r.angularTickLayout=b);var _,w=h.calcTicks(g);if(\"linear\"===e.gridshape?(_=w.map(m),o.angleDelta(_[0],_[1])<0&&(_=_.slice().reverse())):_=null,r.vangles=_,\"category\"===g.type&&(w=w.filter((function(t){return o.isAngleInsideSector(m(t),r.sectorInRad)}))),g.visible){var T=\"inside\"===g.ticks?-1:1,k=(g.linewidth||1)/2;h.drawTicks(n,g,{vals:w,layer:i[\"angular-axis\"],path:\"M\"+T*k+\",0h\"+T*g.ticklen,transFn:function(t){var e=m(t);return v(e)+s(-P(e))},crisp:!1}),h.drawGrid(n,g,{vals:w,layer:i[\"angular-grid\"],path:function(t){var e=m(t),r=Math.cos(e),n=Math.sin(e);return\"M\"+[f+u*r,p-u*n]+\"L\"+[f+a*r,p-a*n]},transFn:o.noop,crisp:!1}),h.drawLabels(n,g,{vals:w,layer:i[\"angular-axis\"],repositionOnUpdate:!0,transFn:function(t){return v(m(t))},labelFns:x})}F(i[\"angular-line\"].select(\"path\"),d.showline,{d:r.pathSubplot(),transform:l(f,p)}).attr(\"stroke-width\",d.linewidth).call(c.stroke,d.linecolor)},O.updateFx=function(t,e){this.gd._context.staticPlot||(this.updateAngularDrag(t),this.updateRadialDrag(t,e,0),this.updateRadialDrag(t,e,1),this.updateMainDrag(t))},O.updateMainDrag=function(t){var e,r,s=this,c=s.gd,u=s.layers,f=t._zoomlayer,h=S.MINZOOM,p=S.OFFEDGE,d=s.radius,g=s.innerRadius,x=s.cx,T=s.cy,k=s.cxx,M=s.cyy,A=s.sectorInRad,C=s.vangles,L=s.radialAxis,I=E.clampTiny,P=E.findXYatLength,z=E.findEnclosingVertexAngles,O=S.cornerHalfWidth,D=S.cornerLen/2,R=m.makeDragger(u,\"path\",\"maindrag\",\"crosshair\");n.select(R).attr(\"d\",s.pathSubplot()).attr(\"transform\",l(x,T));var F,B,N,j,U,V,q,H,G,Y={element:R,gd:c,subplot:s.id,plotinfo:{id:s.id,xaxis:s.xaxis,yaxis:s.yaxis},xaxes:[s.xaxis],yaxes:[s.yaxis]};function W(t,e){return Math.sqrt(t*t+e*e)}function X(t,e){return W(t-k,e-M)}function Z(t,e){return Math.atan2(M-e,t-k)}function J(t,e){return[t*Math.cos(e),t*Math.sin(-e)]}function K(t,e){if(0===t)return s.pathSector(2*O);var r=D/t,n=e-r,i=e+r,a=Math.max(0,Math.min(t,d)),o=a-O,l=a+O;return\"M\"+J(o,n)+\"A\"+[o,o]+\" 0,0,0 \"+J(o,i)+\"L\"+J(l,i)+\"A\"+[l,l]+\" 0,0,1 \"+J(l,n)+\"Z\"}function Q(t,e,r){if(0===t)return s.pathSector(2*O);var n,i,a=J(t,e),o=J(t,r),l=I((a[0]+o[0])/2),c=I((a[1]+o[1])/2);if(l&&c){var u=c/l,f=-1/u,h=P(O,u,l,c);n=P(D,f,h[0][0],h[0][1]),i=P(D,f,h[1][0],h[1][1])}else{var p,d;c?(p=D,d=O):(p=O,d=D),n=[[l-p,c-d],[l+p,c-d]],i=[[l-p,c+d],[l+p,c+d]]}return\"M\"+n.join(\"L\")+\"L\"+i.reverse().join(\"L\")+\"Z\"}function $(t,e){return e=Math.max(Math.min(e,d),g),th?(t-1&&1===t&&_(e,c,[s.xaxis],[s.yaxis],s.id,Y),r.indexOf(\"event\")>-1&&y.click(c,e,s.id)}Y.prepFn=function(t,n,a){var l=c._fullLayout.dragmode,u=R.getBoundingClientRect();c._fullLayout._calcInverseTransform(c);var h=c._fullLayout._invTransform;e=c._fullLayout._invScaleX,r=c._fullLayout._invScaleY;var p=o.apply3DTransform(h)(n-u.left,a-u.top);if(F=p[0],B=p[1],C){var g=E.findPolygonOffset(d,A[0],A[1],C);F+=k+g[0],B+=M+g[1]}switch(l){case\"zoom\":Y.moveFn=C?nt:et,Y.clickFn=ot,Y.doneFn=it,function(){N=null,j=null,U=s.pathSubplot(),V=!1;var t=c._fullLayout[s.id];q=i(t.bgcolor).getLuminance(),(H=m.makeZoombox(f,q,x,T,U)).attr(\"fill-rule\",\"evenodd\"),G=m.makeCorners(f,x,T),w(c)}();break;case\"select\":case\"lasso\":b(t,n,a,Y,l)}},R.onmousemove=function(t){y.hover(c,t,s.id),c._fullLayout._lasthover=R,c._fullLayout._hoversubplot=s.id},R.onmouseout=function(t){c._dragging||v.unhover(c,t)},v.init(Y)},O.updateRadialDrag=function(t,e,r){var i=this,c=i.gd,u=i.layers,f=i.radius,h=i.innerRadius,p=i.cx,d=i.cy,g=i.radialAxis,y=S.radialDragBoxSize,x=y/2;if(g.visible){var b,_,T,A=I(i.radialAxisAngle),E=g._rl,C=E[0],L=E[1],z=E[r],O=.75*(E[1]-E[0])/(1-e.hole)/f;r?(b=p+(f+x)*Math.cos(A),_=d-(f+x)*Math.sin(A),T=\"radialdrag\"):(b=p+(h-x)*Math.cos(A),_=d-(h-x)*Math.sin(A),T=\"radialdrag-inner\");var D,B,N,j=m.makeRectDragger(u,T,\"crosshair\",-x,-x,y,y),U={element:j,gd:c};F(n.select(j),g.visible&&h0==(r?N>C:Nn?function(t){return t<=0}:function(t){return t>=0};t.c2g=function(r){var n=t.c2l(r)-e;return(s(n)?n:0)+o},t.g2c=function(r){return t.l2c(r+e-o)},t.g2p=function(t){return t*a},t.c2p=function(e){return t.g2p(t.c2g(e))}}}(t,e);break;case\"angularaxis\":!function(t,e){var r=t.type;if(\"linear\"===r){var i=t.d2c,s=t.c2d;t.d2c=function(t,e){return function(t,e){return\"degrees\"===e?a(t):t}(i(t),e)},t.c2d=function(t,e){return s(function(t,e){return\"degrees\"===e?o(t):t}(t,e))}}t.makeCalcdata=function(e,i){var a,o,s=e[i],l=e._length,c=function(r){return t.d2c(r,e.thetaunit)};if(s){if(n.isTypedArray(s)&&\"linear\"===r){if(l===s.length)return s;if(s.subarray)return s.subarray(0,l)}for(a=new Array(l),o=0;o0){for(var n=[],i=0;i=u&&(p.min=0,g.min=0,m.min=0,t.aaxis&&delete t.aaxis.min,t.baxis&&delete t.baxis.min,t.caxis&&delete t.caxis.min)}function d(t,e,r,n){var i=f[e._name];function o(r,n){return a.coerce(t,e,i,r,n)}o(\"uirevision\",n.uirevision),e.type=\"linear\";var h=o(\"color\"),p=h!==i.color.dflt?h:r.font.color,d=e._name.charAt(0).toUpperCase(),g=\"Component \"+d,m=o(\"title.text\",g);e._hovertitle=m===g?m:d,a.coerceFont(o,\"title.font\",{family:r.font.family,size:Math.round(1.2*r.font.size),color:p}),o(\"min\"),c(t,e,o,\"linear\"),s(t,e,o,\"linear\",{}),l(t,e,o,{outerTicks:!0}),o(\"showticklabels\")&&(a.coerceFont(o,\"tickfont\",{family:r.font.family,size:r.font.size,color:p}),o(\"tickangle\"),o(\"tickformat\")),u(t,e,o,{dfltColor:h,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),o(\"hoverformat\"),o(\"layer\")}e.exports=function(t,e,r){o(t,e,r,{type:\"ternary\",attributes:f,handleDefaults:p,font:e.font,paper_bgcolor:e.paper_bgcolor})}},{\"../../components/color\":643,\"../../lib\":778,\"../../plot_api/plot_template\":817,\"../cartesian/line_grid_defaults\":844,\"../cartesian/tick_label_defaults\":849,\"../cartesian/tick_mark_defaults\":850,\"../cartesian/tick_value_defaults\":851,\"../subplot_defaults\":905,\"./layout_attributes\":908}],910:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"tinycolor2\"),a=t(\"../../registry\"),o=t(\"../../lib\"),s=o.strTranslate,l=o._,c=t(\"../../components/color\"),u=t(\"../../components/drawing\"),f=t(\"../cartesian/set_convert\"),h=t(\"../../lib/extend\").extendFlat,p=t(\"../plots\"),d=t(\"../cartesian/axes\"),g=t(\"../../components/dragelement\"),m=t(\"../../components/fx\"),v=t(\"../../components/dragelement/helpers\"),y=v.freeMode,x=v.rectMode,b=t(\"../../components/titles\"),_=t(\"../cartesian/select\").prepSelect,w=t(\"../cartesian/select\").selectOnClick,T=t(\"../cartesian/select\").clearSelect,k=t(\"../cartesian/select\").clearSelectionsCache,M=t(\"../cartesian/constants\");function A(t,e){this.id=t.id,this.graphDiv=t.graphDiv,this.init(e),this.makeFramework(e),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}e.exports=A;var S=A.prototype;S.init=function(t){this.container=t._ternarylayer,this.defs=t._defs,this.layoutId=t._uid,this.traceHash={},this.layers={}},S.plot=function(t,e){var r=e[this.id],n=e._size;this._hasClipOnAxisFalse=!1;for(var i=0;iE*b?i=(a=b)*E:a=(i=x)/E,o=v*i/x,l=y*a/b,r=e.l+e.w*g-i/2,n=e.t+e.h*(1-m)-a/2,p.x0=r,p.y0=n,p.w=i,p.h=a,p.sum=_,p.xaxis={type:\"linear\",range:[w+2*k-_,_-w-2*T],domain:[g-o/2,g+o/2],_id:\"x\"},f(p.xaxis,p.graphDiv._fullLayout),p.xaxis.setScale(),p.xaxis.isPtWithinRange=function(t){return t.a>=p.aaxis.range[0]&&t.a<=p.aaxis.range[1]&&t.b>=p.baxis.range[1]&&t.b<=p.baxis.range[0]&&t.c>=p.caxis.range[1]&&t.c<=p.caxis.range[0]},p.yaxis={type:\"linear\",range:[w,_-T-k],domain:[m-l/2,m+l/2],_id:\"y\"},f(p.yaxis,p.graphDiv._fullLayout),p.yaxis.setScale(),p.yaxis.isPtWithinRange=function(){return!0};var M=p.yaxis.domain[0],A=p.aaxis=h({},t.aaxis,{range:[w,_-T-k],side:\"left\",tickangle:(+t.aaxis.tickangle||0)-30,domain:[M,M+l*E],anchor:\"free\",position:0,_id:\"y\",_length:i});f(A,p.graphDiv._fullLayout),A.setScale();var S=p.baxis=h({},t.baxis,{range:[_-w-k,T],side:\"bottom\",domain:p.xaxis.domain,anchor:\"free\",position:0,_id:\"x\",_length:i});f(S,p.graphDiv._fullLayout),S.setScale();var C=p.caxis=h({},t.caxis,{range:[_-w-T,k],side:\"right\",tickangle:(+t.caxis.tickangle||0)+30,domain:[M,M+l*E],anchor:\"free\",position:0,_id:\"y\",_length:i});f(C,p.graphDiv._fullLayout),C.setScale();var L=\"M\"+r+\",\"+(n+a)+\"h\"+i+\"l-\"+i/2+\",-\"+a+\"Z\";p.clipDef.select(\"path\").attr(\"d\",L),p.layers.plotbg.select(\"path\").attr(\"d\",L);var I=\"M0,\"+a+\"h\"+i+\"l-\"+i/2+\",-\"+a+\"Z\";p.clipDefRelative.select(\"path\").attr(\"d\",I);var P=s(r,n);p.plotContainer.selectAll(\".scatterlayer,.maplayer\").attr(\"transform\",P),p.clipDefRelative.select(\"path\").attr(\"transform\",null);var z=s(r-S._offset,n+a);p.layers.baxis.attr(\"transform\",z),p.layers.bgrid.attr(\"transform\",z);var O=s(r+i/2,n)+\"rotate(30)\"+s(0,-A._offset);p.layers.aaxis.attr(\"transform\",O),p.layers.agrid.attr(\"transform\",O);var D=s(r+i/2,n)+\"rotate(-30)\"+s(0,-C._offset);p.layers.caxis.attr(\"transform\",D),p.layers.cgrid.attr(\"transform\",D),p.drawAxes(!0),p.layers.aline.select(\"path\").attr(\"d\",A.showline?\"M\"+r+\",\"+(n+a)+\"l\"+i/2+\",-\"+a:\"M0,0\").call(c.stroke,A.linecolor||\"#000\").style(\"stroke-width\",(A.linewidth||0)+\"px\"),p.layers.bline.select(\"path\").attr(\"d\",S.showline?\"M\"+r+\",\"+(n+a)+\"h\"+i:\"M0,0\").call(c.stroke,S.linecolor||\"#000\").style(\"stroke-width\",(S.linewidth||0)+\"px\"),p.layers.cline.select(\"path\").attr(\"d\",C.showline?\"M\"+(r+i/2)+\",\"+n+\"l\"+i/2+\",\"+a:\"M0,0\").call(c.stroke,C.linecolor||\"#000\").style(\"stroke-width\",(C.linewidth||0)+\"px\"),p.graphDiv._context.staticPlot||p.initInteractions(),u.setClipUrl(p.layers.frontplot,p._hasClipOnAxisFalse?null:p.clipId,p.graphDiv)},S.drawAxes=function(t){var e=this.graphDiv,r=this.id.substr(7)+\"title\",n=this.layers,i=this.aaxis,a=this.baxis,o=this.caxis;if(this.drawAx(i),this.drawAx(a),this.drawAx(o),t){var s=Math.max(i.showticklabels?i.tickfont.size/2:0,(o.showticklabels?.75*o.tickfont.size:0)+(\"outside\"===o.ticks?.87*o.ticklen:0)),c=(a.showticklabels?a.tickfont.size:0)+(\"outside\"===a.ticks?a.ticklen:0)+3;n[\"a-title\"]=b.draw(e,\"a\"+r,{propContainer:i,propName:this.id+\".aaxis.title\",placeholder:l(e,\"Click to enter Component A title\"),attributes:{x:this.x0+this.w/2,y:this.y0-i.title.font.size/3-s,\"text-anchor\":\"middle\"}}),n[\"b-title\"]=b.draw(e,\"b\"+r,{propContainer:a,propName:this.id+\".baxis.title\",placeholder:l(e,\"Click to enter Component B title\"),attributes:{x:this.x0-c,y:this.y0+this.h+.83*a.title.font.size+c,\"text-anchor\":\"middle\"}}),n[\"c-title\"]=b.draw(e,\"c\"+r,{propContainer:o,propName:this.id+\".caxis.title\",placeholder:l(e,\"Click to enter Component C title\"),attributes:{x:this.x0+this.w+c,y:this.y0+this.h+.83*o.title.font.size+c,\"text-anchor\":\"middle\"}})}},S.drawAx=function(t){var e,r=this.graphDiv,n=t._name,i=n.charAt(0),a=t._id,s=this.layers[n],l=i+\"tickLayout\",c=(e=t).ticks+String(e.ticklen)+String(e.showticklabels);this[l]!==c&&(s.selectAll(\".\"+a+\"tick\").remove(),this[l]=c),t.setScale();var u=d.calcTicks(t),f=d.clipEnds(t,u),h=d.makeTransTickFn(t),p=d.getTickSigns(t)[2],g=o.deg2rad(30),m=p*(t.linewidth||1)/2,v=p*t.ticklen,y=this.w,x=this.h,b=\"b\"===i?\"M0,\"+m+\"l\"+Math.sin(g)*v+\",\"+Math.cos(g)*v:\"M\"+m+\",0l\"+Math.cos(g)*v+\",\"+-Math.sin(g)*v,_={a:\"M0,0l\"+x+\",-\"+y/2,b:\"M0,0l-\"+y/2+\",-\"+x,c:\"M0,0l-\"+x+\",\"+y/2}[i];d.drawTicks(r,t,{vals:\"inside\"===t.ticks?f:u,layer:s,path:b,transFn:h,crisp:!1}),d.drawGrid(r,t,{vals:f,layer:this.layers[i+\"grid\"],path:_,transFn:h,crisp:!1}),d.drawLabels(r,t,{vals:u,layer:s,transFn:h,labelFns:d.makeLabelFns(t,0,30)})};var C=M.MINZOOM/2+.87,L=\"m-0.87,.5h\"+C+\"v3h-\"+(C+5.2)+\"l\"+(C/2+2.6)+\",-\"+(.87*C+4.5)+\"l2.6,1.5l-\"+C/2+\",\"+.87*C+\"Z\",I=\"m0.87,.5h-\"+C+\"v3h\"+(C+5.2)+\"l-\"+(C/2+2.6)+\",-\"+(.87*C+4.5)+\"l-2.6,1.5l\"+C/2+\",\"+.87*C+\"Z\",P=\"m0,1l\"+C/2+\",\"+.87*C+\"l2.6,-1.5l-\"+(C/2+2.6)+\",-\"+(.87*C+4.5)+\"l-\"+(C/2+2.6)+\",\"+(.87*C+4.5)+\"l2.6,1.5l\"+C/2+\",-\"+.87*C+\"Z\",z=!0;function O(t){n.select(t).selectAll(\".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners\").remove()}S.clearSelect=function(){k(this.dragOptions),T(this.dragOptions.gd)},S.initInteractions=function(){var t,e,r,n,f,h,p,d,v,b,T,k,A=this,S=A.layers.plotbg.select(\"path\").node(),C=A.graphDiv,D=C._fullLayout._zoomlayer;function R(t){var e={};return e[A.id+\".aaxis.min\"]=t.a,e[A.id+\".baxis.min\"]=t.b,e[A.id+\".caxis.min\"]=t.c,e}function F(t,e){var r=C._fullLayout.clickmode;O(C),2===t&&(C.emit(\"plotly_doubleclick\",null),a.call(\"_guiRelayout\",C,R({a:0,b:0,c:0}))),r.indexOf(\"select\")>-1&&1===t&&w(e,C,[A.xaxis],[A.yaxis],A.id,A.dragOptions),r.indexOf(\"event\")>-1&&m.click(C,e,A.id)}function B(t,e){return 1-e/A.h}function N(t,e){return 1-(t+(A.h-e)/Math.sqrt(3))/A.w}function j(t,e){return(t-(A.h-e)/Math.sqrt(3))/A.w}function U(i,a){var o=r+i*t,s=n+a*e,l=Math.max(0,Math.min(1,B(0,n),B(0,s))),c=Math.max(0,Math.min(1,N(r,n),N(o,s))),u=Math.max(0,Math.min(1,j(r,n),j(o,s))),g=(l/2+u)*A.w,m=(1-l/2-c)*A.w,y=(g+m)/2,x=m-g,_=(1-l)*A.h,w=_-x/E;x.2?\"rgba(0,0,0,0.4)\":\"rgba(255,255,255,0.3)\").duration(200),k.transition().style(\"opacity\",1).duration(200),b=!0),C.emit(\"plotly_relayouting\",R(p))}function V(){O(C),p!==f&&(a.call(\"_guiRelayout\",C,R(p)),z&&C.data&&C._context.showTips&&(o.notifier(l(C,\"Double-click to zoom back out\"),\"long\"),z=!1))}function q(t,e){var r=t/A.xaxis._m,n=e/A.yaxis._m,i=[(p={a:f.a-n,b:f.b+(r+n)/2,c:f.c-(r-n)/2}).a,p.b,p.c].sort(o.sorterAsc),a=i.indexOf(p.a),l=i.indexOf(p.b),c=i.indexOf(p.c);i[0]<0&&(i[1]+i[0]/2<0?(i[2]+=i[0]+i[1],i[0]=i[1]=0):(i[2]+=i[0]/2,i[1]+=i[0]/2,i[0]=0),p={a:i[a],b:i[l],c:i[c]},e=(f.a-p.a)*A.yaxis._m,t=(f.c-p.c-f.b+p.b)*A.xaxis._m);var h=s(A.x0+t,A.y0+e);A.plotContainer.selectAll(\".scatterlayer,.maplayer\").attr(\"transform\",h);var d=s(-t,-e);A.clipDefRelative.select(\"path\").attr(\"transform\",d),A.aaxis.range=[p.a,A.sum-p.b-p.c],A.baxis.range=[A.sum-p.a-p.c,p.b],A.caxis.range=[A.sum-p.a-p.b,p.c],A.drawAxes(!1),A._hasClipOnAxisFalse&&A.plotContainer.select(\".scatterlayer\").selectAll(\".trace\").call(u.hideOutsideRangePoints,A),C.emit(\"plotly_relayouting\",R(p))}function H(){a.call(\"_guiRelayout\",C,R(p))}this.dragOptions={element:S,gd:C,plotinfo:{id:A.id,domain:C._fullLayout[A.id].domain,xaxis:A.xaxis,yaxis:A.yaxis},subplot:A.id,prepFn:function(a,l,u){A.dragOptions.xaxes=[A.xaxis],A.dragOptions.yaxes=[A.yaxis],t=C._fullLayout._invScaleX,e=C._fullLayout._invScaleY;var g=A.dragOptions.dragmode=C._fullLayout.dragmode;y(g)?A.dragOptions.minDrag=1:A.dragOptions.minDrag=void 0,\"zoom\"===g?(A.dragOptions.moveFn=U,A.dragOptions.clickFn=F,A.dragOptions.doneFn=V,function(t,e,a){var l=S.getBoundingClientRect();r=e-l.left,n=a-l.top,C._fullLayout._calcInverseTransform(C);var u=C._fullLayout._invTransform,g=o.apply3DTransform(u)(r,n);r=g[0],n=g[1],f={a:A.aaxis.range[0],b:A.baxis.range[1],c:A.caxis.range[1]},p=f,h=A.aaxis.range[1]-f.a,d=i(A.graphDiv._fullLayout[A.id].bgcolor).getLuminance(),v=\"M0,\"+A.h+\"L\"+A.w/2+\", 0L\"+A.w+\",\"+A.h+\"Z\",b=!1,T=D.append(\"path\").attr(\"class\",\"zoombox\").attr(\"transform\",s(A.x0,A.y0)).style({fill:d>.2?\"rgba(0,0,0,0)\":\"rgba(255,255,255,0)\",\"stroke-width\":0}).attr(\"d\",v),k=D.append(\"path\").attr(\"class\",\"zoombox-corners\").attr(\"transform\",s(A.x0,A.y0)).style({fill:c.background,stroke:c.defaultLine,\"stroke-width\":1,opacity:0}).attr(\"d\",\"M0,0Z\"),A.clearSelect(C)}(0,l,u)):\"pan\"===g?(A.dragOptions.moveFn=q,A.dragOptions.clickFn=F,A.dragOptions.doneFn=H,f={a:A.aaxis.range[0],b:A.baxis.range[1],c:A.caxis.range[1]},p=f,A.clearSelect(C)):(x(g)||y(g))&&_(a,l,u,A.dragOptions,g)}},S.onmousemove=function(t){m.hover(C,t,A.id),C._fullLayout._lasthover=S,C._fullLayout._hoversubplot=A.id},S.onmouseout=function(t){C._dragging||g.unhover(C,t)},g.init(this.dragOptions)}},{\"../../components/color\":643,\"../../components/dragelement\":662,\"../../components/dragelement/helpers\":661,\"../../components/drawing\":665,\"../../components/fx\":683,\"../../components/titles\":738,\"../../lib\":778,\"../../lib/extend\":768,\"../../registry\":911,\"../cartesian/axes\":828,\"../cartesian/constants\":834,\"../cartesian/select\":847,\"../cartesian/set_convert\":848,\"../plots\":891,d3:169,tinycolor2:576}],911:[function(t,e,r){\"use strict\";var n=t(\"./lib/loggers\"),i=t(\"./lib/noop\"),a=t(\"./lib/push_unique\"),o=t(\"./lib/is_plain_object\"),s=t(\"./lib/dom\").addStyleRule,l=t(\"./lib/extend\"),c=t(\"./plots/attributes\"),u=t(\"./plots/layout_attributes\"),f=l.extendFlat,h=l.extendDeepAll;function p(t){var e=t.name,i=t.categories,a=t.meta;if(r.modules[e])n.log(\"Type \"+e+\" already registered\");else{r.subplotsRegistry[t.basePlotModule.name]||function(t){var e=t.name;if(r.subplotsRegistry[e])return void n.log(\"Plot type \"+e+\" already registered.\");for(var i in v(t),r.subplotsRegistry[e]=t,r.componentsRegistry)b(i,t.name)}(t.basePlotModule);for(var o={},l=0;l-1&&(f[p[r]].title={text:\"\"});for(r=0;r\")?\"\":e.html(t).text()}));return e.remove(),r}(T),T=(T=T.replace(/&(?!\\w+;|\\#[0-9]+;| \\#x[0-9A-F]+;)/g,\"&\")).replace(c,\"'\"),i.isIE()&&(T=(T=(T=T.replace(/\"/gi,\"'\")).replace(/(\\('#)([^']*)('\\))/gi,'(\"#$2\")')).replace(/(\\\\')/gi,'\"')),T}},{\"../components/color\":643,\"../components/drawing\":665,\"../constants/xmlns_namespaces\":754,\"../lib\":778,d3:169}],920:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){for(var r=0;rf+c||!n(u))}for(var p=0;pa))return e}return void 0!==r?r:t.dflt},r.coerceColor=function(t,e,r){return i(e).isValid()?e:void 0!==r?r:t.dflt},r.coerceEnumerated=function(t,e,r){return t.coerceNumber&&(e=+e),-1!==t.values.indexOf(e)?e:void 0!==r?r:t.dflt},r.getValue=function(t,e){var r;return Array.isArray(t)?e0?i+=a:e<0&&(i-=a)}return n.inbox(r-e,i-e,b+(i-e)/(i-r)-1)}\"h\"===m.orientation?(a=r,s=e,u=\"y\",f=\"x\",h=S,p=A):(a=e,s=r,u=\"x\",f=\"y\",p=S,h=A);var E=t[u+\"a\"],C=t[f+\"a\"];d=Math.abs(E.r2c(E.range[1])-E.r2c(E.range[0]));var L=n.getDistanceFunction(i,h,p,(function(t){return(h(t)+p(t))/2}));if(n.getClosest(g,L,t),!1!==t.index&&g[t.index].p!==c){y||(T=function(t){return Math.min(_(t),t.p-v.bargroupwidth/2)},k=function(t){return Math.max(w(t),t.p+v.bargroupwidth/2)});var I=g[t.index],P=m.base?I.b+I.s:I.s;t[f+\"0\"]=t[f+\"1\"]=C.c2p(I[f],!0),t[f+\"LabelVal\"]=P;var z=v.extents[v.extents.round(I.p)];t[u+\"0\"]=E.c2p(y?T(I):z[0],!0),t[u+\"1\"]=E.c2p(y?k(I):z[1],!0);var O=void 0!==I.orig_p;return t[u+\"LabelVal\"]=O?I.orig_p:I.p,t.labelLabel=l(E,t[u+\"LabelVal\"]),t.valueLabel=l(C,t[f+\"LabelVal\"]),t.baseLabel=l(C,I.b),t.spikeDistance=(S(I)+function(t){return M(_(t),w(t))}(I))/2-b,t[u+\"Spike\"]=E.c2p(I.p,!0),o(I,m,t),t.hovertemplate=m.hovertemplate,t}}function f(t,e){var r=e.mcc||t.marker.color,n=e.mlcc||t.marker.line.color,i=s(t,e);return a.opacity(r)?r:a.opacity(n)&&i?n:void 0}e.exports={hoverPoints:function(t,e,r,n){var a=u(t,e,r,n);if(a){var o=a.cd,s=o[0].trace,l=o[a.index];return a.color=f(s,l),i.getComponentMethod(\"errorbars\",\"hoverInfo\")(l,s,a),[a]}},hoverOnBars:u,getTraceColor:f}},{\"../../components/color\":643,\"../../components/fx\":683,\"../../constants/numerical\":753,\"../../lib\":778,\"../../plots/cartesian/axes\":828,\"../../registry\":911,\"./helpers\":927}],929:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,crossTraceDefaults:t(\"./defaults\").crossTraceDefaults,supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\"),crossTraceCalc:t(\"./cross_trace_calc\").crossTraceCalc,colorbar:t(\"../scatter/marker_colorbar\"),arraysToCalcdata:t(\"./arrays_to_calcdata\"),plot:t(\"./plot\").plot,style:t(\"./style\").style,styleOnSelect:t(\"./style\").styleOnSelect,hoverPoints:t(\"./hover\").hoverPoints,eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),moduleType:\"trace\",name:\"bar\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"bar-like\",\"cartesian\",\"svg\",\"bar\",\"oriented\",\"errorBarsOK\",\"showLegend\",\"zoomScale\"],animatable:!0,meta:{}}},{\"../../plots/cartesian\":841,\"../scatter/marker_colorbar\":1205,\"./arrays_to_calcdata\":920,\"./attributes\":921,\"./calc\":922,\"./cross_trace_calc\":924,\"./defaults\":925,\"./event_data\":926,\"./hover\":928,\"./layout_attributes\":930,\"./layout_defaults\":931,\"./plot\":932,\"./select\":933,\"./style\":935}],930:[function(t,e,r){\"use strict\";e.exports={barmode:{valType:\"enumerated\",values:[\"stack\",\"group\",\"overlay\",\"relative\"],dflt:\"group\",editType:\"calc\"},barnorm:{valType:\"enumerated\",values:[\"\",\"fraction\",\"percent\"],dflt:\"\",editType:\"calc\"},bargap:{valType:\"number\",min:0,max:1,editType:\"calc\"},bargroupgap:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"}}},{}],931:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../../lib\"),o=t(\"./layout_attributes\");e.exports=function(t,e,r){function s(r,n){return a.coerce(t,e,o,r,n)}for(var l=!1,c=!1,u=!1,f={},h=s(\"barmode\"),p=0;p0}function S(t){return\"auto\"===t?0:t}function E(t,e){var r=Math.PI/180*e,n=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:t.width*i+t.height*n,y:t.width*n+t.height*i}}function C(t,e,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,c=a.anchor||\"end\",u=\"end\"===c,f=\"start\"===c,h=((a.leftToRight||0)+1)/2,p=1-h,d=i.width,g=i.height,m=Math.abs(e-t),v=Math.abs(n-r),y=m>2*_&&v>2*_?_:0;m-=2*y,v-=2*y;var x=S(l);\"auto\"!==l||d<=m&&g<=v||!(d>m||g>v)||(d>v||g>m)&&d.01?H:function(t,e,r){return r&&t===e?t:Math.abs(t-e)>=2?H(t):t>e?Math.ceil(t):Math.floor(t)};B=G(B,N,D),N=G(N,B,D),j=G(j,U,!D),U=G(U,j,!D)}var Y=M(a.ensureSingle(P,\"path\"),I,m,v);if(Y.style(\"vector-effect\",\"non-scaling-stroke\").attr(\"d\",isNaN((N-B)*(U-j))||V&&t._context.staticPlot?\"M0,0Z\":\"M\"+B+\",\"+j+\"V\"+U+\"H\"+N+\"V\"+j+\"Z\").call(l.setClipUrl,e.layerClipId,t),!I.uniformtext.mode&&R){var W=l.makePointStyleFns(f);l.singlePointStyle(c,Y,f,W,t)}!function(t,e,r,n,i,s,c,f,p,m,v){var w,T=e.xaxis,A=e.yaxis,L=t._fullLayout;function I(e,r,n){return a.ensureSingle(e,\"text\").text(r).attr({class:\"bartext bartext-\"+w,\"text-anchor\":\"middle\",\"data-notex\":1}).call(l.font,n).call(o.convertToTspans,t)}var P=n[0].trace,z=\"h\"===P.orientation,O=function(t,e,r,n,i){var o,s=e[0].trace;o=s.texttemplate?function(t,e,r,n,i){var o=e[0].trace,s=a.castOption(o,r,\"texttemplate\");if(!s)return\"\";var l,c,f,h,p=\"waterfall\"===o.type,d=\"funnel\"===o.type;\"h\"===o.orientation?(l=\"y\",c=i,f=\"x\",h=n):(l=\"x\",c=n,f=\"y\",h=i);function g(t){return u(h,+t,!0).text}var m=e[r],v={};v.label=m.p,v.labelLabel=v[l+\"Label\"]=(y=m.p,u(c,y,!0).text);var y;var x=a.castOption(o,m.i,\"text\");(0===x||x)&&(v.text=x);v.value=m.s,v.valueLabel=v[f+\"Label\"]=g(m.s);var _={};b(_,o,m.i),p&&(v.delta=+m.rawS||m.s,v.deltaLabel=g(v.delta),v.final=m.v,v.finalLabel=g(v.final),v.initial=v.final-v.delta,v.initialLabel=g(v.initial));d&&(v.value=m.s,v.valueLabel=g(v.value),v.percentInitial=m.begR,v.percentInitialLabel=a.formatPercent(m.begR),v.percentPrevious=m.difR,v.percentPreviousLabel=a.formatPercent(m.difR),v.percentTotal=m.sumR,v.percenTotalLabel=a.formatPercent(m.sumR));var w=a.castOption(o,m.i,\"customdata\");w&&(v.customdata=w);return a.texttemplateString(s,v,t._d3locale,_,v,o._meta||{})}(t,e,r,n,i):s.textinfo?function(t,e,r,n){var i=t[0].trace,o=\"h\"===i.orientation,s=\"waterfall\"===i.type,l=\"funnel\"===i.type;function c(t){return u(o?r:n,+t,!0).text}var f,h=i.textinfo,p=t[e],d=h.split(\"+\"),g=[],m=function(t){return-1!==d.indexOf(t)};m(\"label\")&&g.push((v=t[e].p,u(o?n:r,v,!0).text));var v;m(\"text\")&&(0===(f=a.castOption(i,p.i,\"text\"))||f)&&g.push(f);if(s){var y=+p.rawS||p.s,x=p.v,b=x-y;m(\"initial\")&&g.push(c(b)),m(\"delta\")&&g.push(c(y)),m(\"final\")&&g.push(c(x))}if(l){m(\"value\")&&g.push(c(p.s));var _=0;m(\"percent initial\")&&_++,m(\"percent previous\")&&_++,m(\"percent total\")&&_++;var w=_>1;m(\"percent initial\")&&(f=a.formatPercent(p.begR),w&&(f+=\" of initial\"),g.push(f)),m(\"percent previous\")&&(f=a.formatPercent(p.difR),w&&(f+=\" of previous\"),g.push(f)),m(\"percent total\")&&(f=a.formatPercent(p.sumR),w&&(f+=\" of total\"),g.push(f))}return g.join(\"
\")}(e,r,n,i):g.getValue(s.text,r);return g.coerceString(y,o)}(L,n,i,T,A);w=function(t,e){var r=g.getValue(t.textposition,e);return g.coerceEnumerated(x,r)}(P,i);var D=\"stack\"===m.mode||\"relative\"===m.mode,R=n[i],F=!D||R._outmost;if(!O||\"none\"===w||(R.isBlank||s===c||f===p)&&(\"auto\"===w||\"inside\"===w))return void r.select(\"text\").remove();var B=L.font,N=d.getBarColor(n[i],P),j=d.getInsideTextFont(P,i,B,N),U=d.getOutsideTextFont(P,i,B),V=r.datum();z?\"log\"===T.type&&V.s0<=0&&(s=T.range[0]=G*(Z/Y):Z>=Y*(X/G);G>0&&Y>0&&(J||K||Q)?w=\"inside\":(w=\"outside\",q.remove(),q=null)}else w=\"inside\";if(!q){W=a.ensureUniformFontSize(t,\"outside\"===w?U:j);var $=(q=I(r,O,W)).attr(\"transform\");if(q.attr(\"transform\",\"\"),H=l.bBox(q.node()),G=H.width,Y=H.height,q.attr(\"transform\",$),G<=0||Y<=0)return void q.remove()}var tt,et,rt=P.textangle;\"outside\"===w?(et=\"both\"===P.constraintext||\"outside\"===P.constraintext,tt=function(t,e,r,n,i,a){var o,s=!!a.isHorizontal,l=!!a.constrained,c=a.angle||0,u=i.width,f=i.height,h=Math.abs(e-t),p=Math.abs(n-r);o=s?p>2*_?_:0:h>2*_?_:0;var d=1;l&&(d=s?Math.min(1,p/f):Math.min(1,h/u));var g=S(c),m=E(i,g),v=(s?m.x:m.y)/2,y=(i.left+i.right)/2,x=(i.top+i.bottom)/2,b=(t+e)/2,w=(r+n)/2,T=0,M=0,A=s?k(e,t):k(r,n);s?(b=e-A*o,T=A*v):(w=n+A*o,M=-A*v);return{textX:y,textY:x,targetX:b,targetY:w,anchorX:T,anchorY:M,scale:d,rotate:g}}(s,c,f,p,H,{isHorizontal:z,constrained:et,angle:rt})):(et=\"both\"===P.constraintext||\"inside\"===P.constraintext,tt=C(s,c,f,p,H,{isHorizontal:z,constrained:et,angle:rt,anchor:P.insidetextanchor}));tt.fontSize=W.size,h(P.type,tt,L),R.transform=tt,M(q,L,m,v).attr(\"transform\",a.getTextTransform(tt))}(t,e,P,r,p,B,N,j,U,m,v),e.layerClipId&&l.hideOutsideRangePoint(c,P.select(\"text\"),w,L,f.xcalendar,f.ycalendar)}));var j=!1===f.cliponaxis;l.setClipUrl(c,j?null:e.layerClipId,t)}));c.getComponentMethod(\"errorbars\",\"plot\")(t,P,e,m)},toMoveInsideBar:C}},{\"../../components/color\":643,\"../../components/drawing\":665,\"../../components/fx/helpers\":679,\"../../lib\":778,\"../../lib/svg_text_utils\":803,\"../../plots/cartesian/axes\":828,\"../../registry\":911,\"./attributes\":921,\"./constants\":923,\"./helpers\":927,\"./style\":935,\"./uniform_text\":937,d3:169,\"fast-isnumeric\":241}],933:[function(t,e,r){\"use strict\";function n(t,e,r,n,i){var a=e.c2p(n?t.s0:t.p0,!0),o=e.c2p(n?t.s1:t.p1,!0),s=r.c2p(n?t.p0:t.s0,!0),l=r.c2p(n?t.p1:t.s1,!0);return i?[(a+o)/2,(s+l)/2]:n?[o,(s+l)/2]:[(a+o)/2,l]}e.exports=function(t,e){var r,i=t.cd,a=t.xaxis,o=t.yaxis,s=i[0].trace,l=\"funnel\"===s.type,c=\"h\"===s.orientation,u=[];if(!1===e)for(r=0;r1||0===i.bargap&&0===i.bargroupgap&&!t[0].trace.marker.line.width)&&n.select(this).attr(\"shape-rendering\",\"crispEdges\")})),e.selectAll(\"g.points\").each((function(e){d(n.select(this),e[0].trace,t)})),s.getComponentMethod(\"errorbars\",\"style\")(e)},styleTextPoints:g,styleOnSelect:function(t,e,r){var i=e[0].trace;i.selectedpoints?function(t,e,r){a.selectedPointStyle(t.selectAll(\"path\"),e),function(t,e,r){t.each((function(t){var i,s=n.select(this);if(t.selected){i=o.ensureUniformFontSize(r,m(s,t,e,r));var l=e.selected.textfont&&e.selected.textfont.color;l&&(i.color=l),a.font(s,i)}else a.selectedTextStyle(s,e)}))}(t.selectAll(\"text\"),e,r)}(r,i,t):(d(r,i,t),s.getComponentMethod(\"errorbars\",\"style\")(r))},getInsideTextFont:y,getOutsideTextFont:x,getBarColor:_,resizeText:l}},{\"../../components/color\":643,\"../../components/drawing\":665,\"../../lib\":778,\"../../registry\":911,\"./attributes\":921,\"./helpers\":927,\"./uniform_text\":937,d3:169}],936:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"../../components/colorscale/helpers\").hasColorscale,a=t(\"../../components/colorscale/defaults\");e.exports=function(t,e,r,o,s){r(\"marker.color\",o),i(t,\"marker\")&&a(t,e,s,r,{prefix:\"marker.\",cLetter:\"c\"}),r(\"marker.line.color\",n.defaultLine),i(t,\"marker.line\")&&a(t,e,s,r,{prefix:\"marker.line.\",cLetter:\"c\"}),r(\"marker.line.width\"),r(\"marker.opacity\"),r(\"selected.marker.color\"),r(\"unselected.marker.color\")}},{\"../../components/color\":643,\"../../components/colorscale/defaults\":653,\"../../components/colorscale/helpers\":654}],937:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../lib\");function a(t){return\"_\"+t+\"Text_minsize\"}e.exports={recordMinTextSize:function(t,e,r){if(r.uniformtext.mode){var n=a(t),i=r.uniformtext.minsize,o=e.scale*e.fontSize;e.hide=o g.point\"}e.selectAll(s).each((function(t){var e=t.transform;e&&(e.scale=l&&e.hide?0:o/e.fontSize,n.select(this).select(\"text\").attr(\"transform\",i.getTextTransform(e)))}))}}}},{\"../../lib\":778,d3:169}],938:[function(t,e,r){\"use strict\";var n=t(\"../../plots/template_attributes\").hovertemplateAttrs,i=t(\"../../lib/extend\").extendFlat,a=t(\"../scatterpolar/attributes\"),o=t(\"../bar/attributes\");e.exports={r:a.r,theta:a.theta,r0:a.r0,dr:a.dr,theta0:a.theta0,dtheta:a.dtheta,thetaunit:a.thetaunit,base:i({},o.base,{}),offset:i({},o.offset,{}),width:i({},o.width,{}),text:i({},o.text,{}),hovertext:i({},o.hovertext,{}),marker:o.marker,hoverinfo:a.hoverinfo,hovertemplate:n(),selected:o.selected,unselected:o.unselected}},{\"../../lib/extend\":768,\"../../plots/template_attributes\":906,\"../bar/attributes\":921,\"../scatterpolar/attributes\":1261}],939:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/helpers\").hasColorscale,i=t(\"../../components/colorscale/calc\"),a=t(\"../bar/arrays_to_calcdata\"),o=t(\"../bar/cross_trace_calc\").setGroupPositions,s=t(\"../scatter/calc_selection\"),l=t(\"../../registry\").traceIs,c=t(\"../../lib\").extendFlat;e.exports={calc:function(t,e){for(var r=t._fullLayout,o=e.subplot,l=r[o].radialaxis,c=r[o].angularaxis,u=l.makeCalcdata(e,\"r\"),f=c.makeCalcdata(e,\"theta\"),h=e._length,p=new Array(h),d=u,g=f,m=0;mh.range[1]&&(x+=Math.PI);if(n.getClosest(c,(function(t){return g(y,x,[t.rp0,t.rp1],[t.thetag0,t.thetag1],d)?m+Math.min(1,Math.abs(t.thetag1-t.thetag0)/v)-1+(t.rp1-y)/(t.rp1-t.rp0)-1:1/0}),t),!1!==t.index){var b=c[t.index];t.x0=t.x1=b.ct[0],t.y0=t.y1=b.ct[1];var _=i.extendFlat({},b,{r:b.s,theta:b.p});return o(b,u,t),s(_,u,f,t),t.hovertemplate=u.hovertemplate,t.color=a(u,b),t.xLabelVal=t.yLabelVal=void 0,b.s<0&&(t.idealAlign=\"left\"),[t]}}},{\"../../components/fx\":683,\"../../lib\":778,\"../../plots/polar/helpers\":893,\"../bar/hover\":928,\"../scatterpolar/hover\":1265}],942:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"barpolar\",basePlotModule:t(\"../../plots/polar\"),categories:[\"polar\",\"bar\",\"showLegend\"],attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\"),supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\").calc,crossTraceCalc:t(\"./calc\").crossTraceCalc,plot:t(\"./plot\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"../scatterpolar/format_labels\"),style:t(\"../bar/style\").style,styleOnSelect:t(\"../bar/style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"../bar/select\"),meta:{}}},{\"../../plots/polar\":894,\"../bar/select\":933,\"../bar/style\":935,\"../scatter/marker_colorbar\":1205,\"../scatterpolar/format_labels\":1264,\"./attributes\":938,\"./calc\":939,\"./defaults\":940,\"./hover\":941,\"./layout_attributes\":943,\"./layout_defaults\":944,\"./plot\":945}],943:[function(t,e,r){\"use strict\";e.exports={barmode:{valType:\"enumerated\",values:[\"stack\",\"overlay\"],dflt:\"stack\",editType:\"calc\"},bargap:{valType:\"number\",dflt:.1,min:0,max:1,editType:\"calc\"}}},{}],944:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e,r){var a,o={};function s(r,o){return n.coerce(t[a]||{},e[a],i,r,o)}for(var l=0;l0?(c=o,u=l):(c=l,u=o);var f=[s.findEnclosingVertexAngles(c,t.vangles)[0],(c+u)/2,s.findEnclosingVertexAngles(u,t.vangles)[1]];return s.pathPolygonAnnulus(n,i,c,u,f,e,r)};return function(t,n,i,o){return a.pathAnnulus(t,n,i,o,e,r)}}(e),p=e.layers.frontplot.select(\"g.barlayer\");a.makeTraceGroups(p,r,\"trace bars\").each((function(){var r=n.select(this),s=a.ensureSingle(r,\"g\",\"points\").selectAll(\"g.point\").data(a.identity);s.enter().append(\"g\").style(\"vector-effect\",\"non-scaling-stroke\").style(\"stroke-miterlimit\",2).classed(\"point\",!0),s.exit().remove(),s.each((function(t){var e,r=n.select(this),o=t.rp0=u.c2p(t.s0),s=t.rp1=u.c2p(t.s1),p=t.thetag0=f.c2g(t.p0),d=t.thetag1=f.c2g(t.p1);if(i(o)&&i(s)&&i(p)&&i(d)&&o!==s&&p!==d){var g=u.c2g(t.s1),m=(p+d)/2;t.ct=[l.c2p(g*Math.cos(m)),c.c2p(g*Math.sin(m))],e=h(o,s,p,d)}else e=\"M0,0Z\";a.ensureSingle(r,\"path\").attr(\"d\",e)})),o.setClipUrl(r,e._hasClipOnAxisFalse?e.clipIds.forTraces:null,t)}))}},{\"../../components/drawing\":665,\"../../lib\":778,\"../../plots/polar/helpers\":893,d3:169,\"fast-isnumeric\":241}],946:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../bar/attributes\"),a=t(\"../../components/color/attributes\"),o=t(\"../../plots/template_attributes\").hovertemplateAttrs,s=t(\"../../lib/extend\").extendFlat,l=n.marker,c=l.line;e.exports={y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},x0:{valType:\"any\",editType:\"calc+clearAxisTypes\"},y0:{valType:\"any\",editType:\"calc+clearAxisTypes\"},dx:{valType:\"number\",editType:\"calc\"},dy:{valType:\"number\",editType:\"calc\"},xperiod:n.xperiod,yperiod:n.yperiod,xperiod0:n.xperiod0,yperiod0:n.yperiod0,xperiodalignment:n.xperiodalignment,yperiodalignment:n.yperiodalignment,name:{valType:\"string\",editType:\"calc+clearAxisTypes\"},q1:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},median:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},q3:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},lowerfence:{valType:\"data_array\",editType:\"calc\"},upperfence:{valType:\"data_array\",editType:\"calc\"},notched:{valType:\"boolean\",editType:\"calc\"},notchwidth:{valType:\"number\",min:0,max:.5,dflt:.25,editType:\"calc\"},notchspan:{valType:\"data_array\",editType:\"calc\"},boxpoints:{valType:\"enumerated\",values:[\"all\",\"outliers\",\"suspectedoutliers\",!1],editType:\"calc\"},jitter:{valType:\"number\",min:0,max:1,editType:\"calc\"},pointpos:{valType:\"number\",min:-2,max:2,editType:\"calc\"},boxmean:{valType:\"enumerated\",values:[!0,\"sd\",!1],editType:\"calc\"},mean:{valType:\"data_array\",editType:\"calc\"},sd:{valType:\"data_array\",editType:\"calc\"},orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],editType:\"calc+clearAxisTypes\"},quartilemethod:{valType:\"enumerated\",values:[\"linear\",\"exclusive\",\"inclusive\"],dflt:\"linear\",editType:\"calc\"},width:{valType:\"number\",min:0,dflt:0,editType:\"calc\"},marker:{outliercolor:{valType:\"color\",dflt:\"rgba(0, 0, 0, 0)\",editType:\"style\"},symbol:s({},l.symbol,{arrayOk:!1,editType:\"plot\"}),opacity:s({},l.opacity,{arrayOk:!1,dflt:1,editType:\"style\"}),size:s({},l.size,{arrayOk:!1,editType:\"calc\"}),color:s({},l.color,{arrayOk:!1,editType:\"style\"}),line:{color:s({},c.color,{arrayOk:!1,dflt:a.defaultLine,editType:\"style\"}),width:s({},c.width,{arrayOk:!1,dflt:0,editType:\"style\"}),outliercolor:{valType:\"color\",editType:\"style\"},outlierwidth:{valType:\"number\",min:0,dflt:1,editType:\"style\"},editType:\"style\"},editType:\"plot\"},line:{color:{valType:\"color\",editType:\"style\"},width:{valType:\"number\",min:0,dflt:2,editType:\"style\"},editType:\"plot\"},fillcolor:n.fillcolor,whiskerwidth:{valType:\"number\",min:0,max:1,dflt:.5,editType:\"calc\"},offsetgroup:i.offsetgroup,alignmentgroup:i.alignmentgroup,selected:{marker:n.selected.marker,editType:\"style\"},unselected:{marker:n.unselected.marker,editType:\"style\"},text:s({},n.text,{}),hovertext:s({},n.hovertext,{}),hovertemplate:o({}),hoveron:{valType:\"flaglist\",flags:[\"boxes\",\"points\"],dflt:\"boxes+points\",editType:\"style\"}}},{\"../../components/color/attributes\":642,\"../../lib/extend\":768,\"../../plots/template_attributes\":906,\"../bar/attributes\":921,\"../scatter/attributes\":1187}],947:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../../plots/cartesian/align_period\"),o=t(\"../../lib\"),s=t(\"../../constants/numerical\").BADNUM,l=o._;e.exports=function(t,e){var r,c,y,x,b,_,w,T=t._fullLayout,k=i.getFromId(t,e.xaxis||\"x\"),M=i.getFromId(t,e.yaxis||\"y\"),A=[],S=\"violin\"===e.type?\"_numViolins\":\"_numBoxes\";\"h\"===e.orientation?(y=k,x=\"x\",b=M,_=\"y\",w=!!e.yperiodalignment):(y=M,x=\"y\",b=k,_=\"x\",w=!!e.xperiodalignment);var E,C,L,I,P,z,O=function(t,e,r,i){var s,l=e+\"0\"in t,c=\"d\"+e in t;if(e in t||l&&c){var u=r.makeCalcdata(t,e);return[a(t,r,e,u),u]}s=l?t[e+\"0\"]:\"name\"in t&&(\"category\"===r.type||n(t.name)&&-1!==[\"linear\",\"log\"].indexOf(r.type)||o.isDateTime(t.name)&&\"date\"===r.type)?t.name:i;for(var f=\"multicategory\"===r.type?r.r2c_just_indices(s):r.d2c(s,0,t[e+\"calendar\"]),h=t._length,p=new Array(h),d=0;dE.uf};if(e._hasPreCompStats){var U=e[x],V=function(t){return y.d2c((e[t]||[])[r])},q=1/0,H=-1/0;for(r=0;r=E.q1&&E.q3>=E.med){var Y=V(\"lowerfence\");E.lf=Y!==s&&Y<=E.q1?Y:p(E,L,I);var W=V(\"upperfence\");E.uf=W!==s&&W>=E.q3?W:d(E,L,I);var X=V(\"mean\");E.mean=X!==s?X:I?o.mean(L,I):(E.q1+E.q3)/2;var Z=V(\"sd\");E.sd=X!==s&&Z>=0?Z:I?o.stdev(L,I,E.mean):E.q3-E.q1,E.lo=g(E),E.uo=m(E);var J=V(\"notchspan\");J=J!==s&&J>0?J:v(E,I),E.ln=E.med-J,E.un=E.med+J;var K=E.lf,Q=E.uf;e.boxpoints&&L.length&&(K=Math.min(K,L[0]),Q=Math.max(Q,L[I-1])),e.notched&&(K=Math.min(K,E.ln),Q=Math.max(Q,E.un)),E.min=K,E.max=Q}else{var $;o.warn([\"Invalid input - make sure that q1 <= median <= q3\",\"q1 = \"+E.q1,\"median = \"+E.med,\"q3 = \"+E.q3].join(\"\\n\")),$=E.med!==s?E.med:E.q1!==s?E.q3!==s?(E.q1+E.q3)/2:E.q1:E.q3!==s?E.q3:0,E.med=$,E.q1=E.q3=$,E.lf=E.uf=$,E.mean=E.sd=$,E.ln=E.un=$,E.min=E.max=$}q=Math.min(q,E.min),H=Math.max(H,E.max),E.pts2=C.filter(j),A.push(E)}}e._extremes[y._id]=i.findExtremes(y,[q,H],{padded:!0})}else{var tt=y.makeCalcdata(e,x),et=function(t,e){for(var r=t.length,n=new Array(r+1),i=0;i=0&&it0){var ut,ft;if((E={}).pos=E[_]=B[r],C=E.pts=nt[r].sort(f),I=(L=E[x]=C.map(h)).length,E.min=L[0],E.max=L[I-1],E.mean=o.mean(L,I),E.sd=o.stdev(L,I,E.mean),E.med=o.interp(L,.5),I%2&&(lt||ct))lt?(ut=L.slice(0,I/2),ft=L.slice(I/2+1)):ct&&(ut=L.slice(0,I/2+1),ft=L.slice(I/2)),E.q1=o.interp(ut,.5),E.q3=o.interp(ft,.5);else E.q1=o.interp(L,.25),E.q3=o.interp(L,.75);E.lf=p(E,L,I),E.uf=d(E,L,I),E.lo=g(E),E.uo=m(E);var ht=v(E,I);E.ln=E.med-ht,E.un=E.med+ht,at=Math.min(at,E.ln),ot=Math.max(ot,E.un),E.pts2=C.filter(j),A.push(E)}e._extremes[y._id]=i.findExtremes(y,e.notched?tt.concat([at,ot]):tt,{padded:!0})}return function(t,e){if(o.isArrayOrTypedArray(e.selectedpoints))for(var r=0;r0?(A[0].t={num:T[S],dPos:N,posLetter:_,valLetter:x,labels:{med:l(t,\"median:\"),min:l(t,\"min:\"),q1:l(t,\"q1:\"),q3:l(t,\"q3:\"),max:l(t,\"max:\"),mean:\"sd\"===e.boxmean?l(t,\"mean \\xb1 \\u03c3:\"):l(t,\"mean:\"),lf:l(t,\"lower fence:\"),uf:l(t,\"upper fence:\")}},T[S]++,A):[{t:{empty:!0}}]};var c={text:\"tx\",hovertext:\"htx\"};function u(t,e,r){for(var n in c)o.isArrayOrTypedArray(e[n])&&(Array.isArray(r)?o.isArrayOrTypedArray(e[n][r[0]])&&(t[c[n]]=e[n][r[0]][r[1]]):t[c[n]]=e[n][r])}function f(t,e){return t.v-e.v}function h(t){return t.v}function p(t,e,r){return 0===r?t.q1:Math.min(t.q1,e[Math.min(o.findBin(2.5*t.q1-1.5*t.q3,e,!0)+1,r-1)])}function d(t,e,r){return 0===r?t.q3:Math.max(t.q3,e[Math.max(o.findBin(2.5*t.q3-1.5*t.q1,e),0)])}function g(t){return 4*t.q1-3*t.q3}function m(t){return 4*t.q3-3*t.q1}function v(t,e){return 0===e?0:1.57*(t.q3-t.q1)/Math.sqrt(e)}},{\"../../constants/numerical\":753,\"../../lib\":778,\"../../plots/cartesian/align_period\":825,\"../../plots/cartesian/axes\":828,\"fast-isnumeric\":241}],948:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/constraints\").getAxisGroup,o=[\"v\",\"h\"];function s(t,e,r,o){var s,l,c,u=e.calcdata,f=e._fullLayout,h=o._id,p=h.charAt(0),d=[],g=0;for(s=0;s1,b=1-f[t+\"gap\"],_=1-f[t+\"groupgap\"];for(s=0;s0){var H=E.pointpos,G=E.jitter,Y=E.marker.size/2,W=0;H+G>=0&&((W=V*(H+G))>A?(q=!0,j=Y,B=W):W>R&&(j=Y,B=A)),W<=A&&(B=A);var X=0;H-G<=0&&((X=-V*(H-G))>S?(q=!0,U=Y,N=X):X>F&&(U=Y,N=S)),X<=S&&(N=S)}else B=A,N=S;var Z=new Array(c.length);for(l=0;l0?(m=\"v\",v=x>0?Math.min(_,b):Math.min(b)):x>0?(m=\"h\",v=Math.min(_)):v=0;if(v){e._length=v;var S=r(\"orientation\",m);e._hasPreCompStats?\"v\"===S&&0===x?(r(\"x0\",0),r(\"dx\",1)):\"h\"===S&&0===y&&(r(\"y0\",0),r(\"dy\",1)):\"v\"===S&&0===x?r(\"x0\"):\"h\"===S&&0===y&&r(\"y0\"),i.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\"],a)}else e.visible=!1}function f(t,e,r,i){var a=i.prefix,o=n.coerce2(t,e,c,\"marker.outliercolor\"),s=r(\"marker.line.outliercolor\"),l=\"outliers\";e._hasPreCompStats?l=\"all\":(o||s)&&(l=\"suspectedoutliers\");var u=r(a+\"points\",l);u?(r(\"jitter\",\"all\"===u?.3:0),r(\"pointpos\",\"all\"===u?-1.5:0),r(\"marker.symbol\"),r(\"marker.opacity\"),r(\"marker.size\"),r(\"marker.color\",e.line.color),r(\"marker.line.color\"),r(\"marker.line.width\"),\"suspectedoutliers\"===u&&(r(\"marker.line.outliercolor\",e.marker.color),r(\"marker.line.outlierwidth\")),r(\"selected.marker.color\"),r(\"unselected.marker.color\"),r(\"selected.marker.size\"),r(\"unselected.marker.size\"),r(\"text\"),r(\"hovertext\")):delete e.marker;var f=r(\"hoveron\");\"all\"!==f&&-1===f.indexOf(\"points\")||r(\"hovertemplate\"),n.coerceSelectionMarkerOpacity(e,r)}e.exports={supplyDefaults:function(t,e,r,i){function s(r,i){return n.coerce(t,e,c,r,i)}if(u(t,e,s,i),!1!==e.visible){o(t,e,i,s);var l=e._hasPreCompStats;l&&(s(\"lowerfence\"),s(\"upperfence\")),s(\"line.color\",(t.marker||{}).color||r),s(\"line.width\"),s(\"fillcolor\",a.addOpacity(e.line.color,.5));var h=!1;if(l){var p=s(\"mean\"),d=s(\"sd\");p&&p.length&&(h=!0,d&&d.length&&(h=\"sd\"))}s(\"boxmean\",h),s(\"whiskerwidth\"),s(\"width\"),s(\"quartilemethod\");var g=!1;if(l){var m=s(\"notchspan\");m&&m.length&&(g=!0)}else n.validate(t.notchwidth,c.notchwidth)&&(g=!0);s(\"notched\",g)&&s(\"notchwidth\"),f(t,e,s,{prefix:\"box\"})}},crossTraceDefaults:function(t,e){var r,i;function a(t){return n.coerce(i._input,i,c,t)}for(var o=0;ot.lo&&(x.so=!0)}return a}));h.enter().append(\"path\").classed(\"point\",!0),h.exit().remove(),h.call(a.translatePoints,o,s)}function l(t,e,r,a){var o,s,l=e.val,c=e.pos,u=!!c.rangebreaks,f=a.bPos,h=a.bPosPxOffset||0,p=r.boxmean||(r.meanline||{}).visible;Array.isArray(a.bdPos)?(o=a.bdPos[0],s=a.bdPos[1]):(o=a.bdPos,s=a.bdPos);var d=t.selectAll(\"path.mean\").data(\"box\"===r.type&&r.boxmean||\"violin\"===r.type&&r.box.visible&&r.meanline.visible?i.identity:[]);d.enter().append(\"path\").attr(\"class\",\"mean\").style({fill:\"none\",\"vector-effect\":\"non-scaling-stroke\"}),d.exit().remove(),d.each((function(t){var e=c.c2l(t.pos+f,!0),i=c.l2p(e-o)+h,a=c.l2p(e+s)+h,d=u?(i+a)/2:c.l2p(e)+h,g=l.c2p(t.mean,!0),m=l.c2p(t.mean-t.sd,!0),v=l.c2p(t.mean+t.sd,!0);\"h\"===r.orientation?n.select(this).attr(\"d\",\"M\"+g+\",\"+i+\"V\"+a+(\"sd\"===p?\"m0,0L\"+m+\",\"+d+\"L\"+g+\",\"+i+\"L\"+v+\",\"+d+\"Z\":\"\")):n.select(this).attr(\"d\",\"M\"+i+\",\"+g+\"H\"+a+(\"sd\"===p?\"m0,0L\"+d+\",\"+m+\"L\"+i+\",\"+g+\"L\"+d+\",\"+v+\"Z\":\"\"))}))}e.exports={plot:function(t,e,r,a){var c=e.xaxis,u=e.yaxis;i.makeTraceGroups(a,r,\"trace boxes\").each((function(t){var e,r,i=n.select(this),a=t[0],f=a.t,h=a.trace;(f.wdPos=f.bdPos*h.whiskerwidth,!0!==h.visible||f.empty)?i.remove():(\"h\"===h.orientation?(e=u,r=c):(e=c,r=u),o(i,{pos:e,val:r},h,f),s(i,{x:c,y:u},h,f),l(i,{pos:e,val:r},h,f))}))},plotBoxAndWhiskers:o,plotPoints:s,plotBoxMean:l}},{\"../../components/drawing\":665,\"../../lib\":778,d3:169}],956:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r,n,i=t.cd,a=t.xaxis,o=t.yaxis,s=[];if(!1===e)for(r=0;r=10)return null;for(var i=1/0,a=-1/0,o=e.length,s=0;s0?Math.floor:Math.ceil,P=C>0?Math.ceil:Math.floor,z=C>0?Math.min:Math.max,O=C>0?Math.max:Math.min,D=I(S+L),R=P(E-L),F=[[f=A(S)]];for(a=D;a*C=0;i--)a[u-i]=t[f][i],o[u-i]=e[f][i];for(s.push({x:a,y:o,bicubic:l}),i=f,a=[],o=[];i>=0;i--)a[f-i]=t[i][0],o[f-i]=e[i][0];return s.push({x:a,y:o,bicubic:c}),s}},{}],970:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"../../lib/extend\").extendFlat;e.exports=function(t,e,r){var a,o,s,l,c,u,f,h,p,d,g,m,v,y,x=t[\"_\"+e],b=t[e+\"axis\"],_=b._gridlines=[],w=b._minorgridlines=[],T=b._boundarylines=[],k=t[\"_\"+r],M=t[r+\"axis\"];\"array\"===b.tickmode&&(b.tickvals=x.slice());var A=t._xctrl,S=t._yctrl,E=A[0].length,C=A.length,L=t._a.length,I=t._b.length;n.prepTicks(b),\"array\"===b.tickmode&&delete b.tickvals;var P=b.smoothing?3:1;function z(n){var i,a,o,s,l,c,u,f,p,d,g,m,v=[],y=[],x={};if(\"b\"===e)for(a=t.b2j(n),o=Math.floor(Math.max(0,Math.min(I-2,a))),s=a-o,x.length=I,x.crossLength=L,x.xy=function(e){return t.evalxy([],e,a)},x.dxy=function(e,r){return t.dxydi([],e,o,r,s)},i=0;i0&&(p=t.dxydi([],i-1,o,0,s),v.push(l[0]+p[0]/3),y.push(l[1]+p[1]/3),d=t.dxydi([],i-1,o,1,s),v.push(f[0]-d[0]/3),y.push(f[1]-d[1]/3)),v.push(f[0]),y.push(f[1]),l=f;else for(i=t.a2i(n),c=Math.floor(Math.max(0,Math.min(L-2,i))),u=i-c,x.length=L,x.crossLength=I,x.xy=function(e){return t.evalxy([],i,e)},x.dxy=function(e,r){return t.dxydj([],c,e,u,r)},a=0;a0&&(g=t.dxydj([],c,a-1,u,0),v.push(l[0]+g[0]/3),y.push(l[1]+g[1]/3),m=t.dxydj([],c,a-1,u,1),v.push(f[0]-m[0]/3),y.push(f[1]-m[1]/3)),v.push(f[0]),y.push(f[1]),l=f;return x.axisLetter=e,x.axis=b,x.crossAxis=M,x.value=n,x.constvar=r,x.index=h,x.x=v,x.y=y,x.smoothing=M.smoothing,x}function O(n){var i,a,o,s,l,c=[],u=[],f={};if(f.length=x.length,f.crossLength=k.length,\"b\"===e)for(o=Math.max(0,Math.min(I-2,n)),l=Math.min(1,Math.max(0,n-o)),f.xy=function(e){return t.evalxy([],e,n)},f.dxy=function(e,r){return t.dxydi([],e,o,r,l)},i=0;ix.length-1||_.push(i(O(o),{color:b.gridcolor,width:b.gridwidth}));for(h=u;hx.length-1||g<0||g>x.length-1))for(m=x[s],v=x[g],a=0;ax[x.length-1]||w.push(i(z(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&T.push(i(O(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&T.push(i(O(x.length-1),{color:b.endlinecolor,width:b.endlinewidth}))}else{for(l=5e-15,u=(c=[Math.floor((x[x.length-1]-b.tick0)/b.dtick*(1+l)),Math.ceil((x[0]-b.tick0)/b.dtick/(1+l))].sort((function(t,e){return t-e})))[0],f=c[1],h=u;h<=f;h++)p=b.tick0+b.dtick*h,_.push(i(z(p),{color:b.gridcolor,width:b.gridwidth}));for(h=u-1;hx[x.length-1]||w.push(i(z(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&T.push(i(z(x[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&T.push(i(z(x[x.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}},{\"../../lib/extend\":768,\"../../plots/cartesian/axes\":828}],971:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"../../lib/extend\").extendFlat;e.exports=function(t,e){var r,a,o,s=e._labels=[],l=e._gridlines;for(r=0;re.length&&(t=t.slice(0,e.length)):t=[],i=0;i90&&(p-=180,l=-l),{angle:p,flip:l,p:t.c2p(n,e,r),offsetMultplier:c}}},{}],985:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../components/drawing\"),a=t(\"./map_1d_array\"),o=t(\"./makepath\"),s=t(\"./orient_text\"),l=t(\"../../lib/svg_text_utils\"),c=t(\"../../lib\"),u=c.strRotate,f=c.strTranslate,h=t(\"../../constants/alignment\");function p(t,e,r,i,s,l){var c=\"const-\"+s+\"-lines\",u=r.selectAll(\".\"+c).data(l);u.enter().append(\"path\").classed(c,!0).style(\"vector-effect\",\"non-scaling-stroke\"),u.each((function(r){var i=r,s=i.x,l=i.y,c=a([],s,t.c2p),u=a([],l,e.c2p),f=\"M\"+o(c,u,i.smoothing);n.select(this).attr(\"d\",f).style(\"stroke-width\",i.width).style(\"stroke\",i.color).style(\"fill\",\"none\")})),u.exit().remove()}function d(t,e,r,a,o,c,h,p){var d=c.selectAll(\"text.\"+p).data(h);d.enter().append(\"text\").classed(p,!0);var g=0,m={};return d.each((function(o,c){var h;if(\"auto\"===o.axis.tickangle)h=s(a,e,r,o.xy,o.dxy);else{var p=(o.axis.tickangle+180)*Math.PI/180;h=s(a,e,r,o.xy,[Math.cos(p),Math.sin(p)])}c||(m={angle:h.angle,flip:h.flip});var d=(o.endAnchor?-1:1)*h.flip,v=n.select(this).attr({\"text-anchor\":d>0?\"start\":\"end\",\"data-notex\":1}).call(i.font,o.font).text(o.text).call(l.convertToTspans,t),y=i.bBox(this);v.attr(\"transform\",f(h.p[0],h.p[1])+u(h.angle)+f(o.axis.labelpadding*d,.3*y.height)),g=Math.max(g,y.width+o.axis.labelpadding)})),d.exit().remove(),m.maxExtent=g,m}e.exports=function(t,e,r,i){var l=e.xaxis,u=e.yaxis,f=t._fullLayout._clips;c.makeTraceGroups(i,r,\"trace\").each((function(e){var r=n.select(this),i=e[0],h=i.trace,g=h.aaxis,m=h.baxis,y=c.ensureSingle(r,\"g\",\"minorlayer\"),x=c.ensureSingle(r,\"g\",\"majorlayer\"),b=c.ensureSingle(r,\"g\",\"boundarylayer\"),_=c.ensureSingle(r,\"g\",\"labellayer\");r.style(\"opacity\",h.opacity),p(l,u,x,g,\"a\",g._gridlines),p(l,u,x,m,\"b\",m._gridlines),p(l,u,y,g,\"a\",g._minorgridlines),p(l,u,y,m,\"b\",m._minorgridlines),p(l,u,b,g,\"a-boundary\",g._boundarylines),p(l,u,b,m,\"b-boundary\",m._boundarylines);var w=d(t,l,u,h,i,_,g._labels,\"a-label\"),T=d(t,l,u,h,i,_,m._labels,\"b-label\");!function(t,e,r,n,i,a,o,l){var u,f,h,p,d=c.aggNums(Math.min,null,r.a),g=c.aggNums(Math.max,null,r.a),m=c.aggNums(Math.min,null,r.b),y=c.aggNums(Math.max,null,r.b);u=.5*(d+g),f=m,h=r.ab2xy(u,f,!0),p=r.dxyda_rough(u,f),void 0===o.angle&&c.extendFlat(o,s(r,i,a,h,r.dxydb_rough(u,f)));v(t,e,r,n,h,p,r.aaxis,i,a,o,\"a-title\"),u=d,f=.5*(m+y),h=r.ab2xy(u,f,!0),p=r.dxydb_rough(u,f),void 0===l.angle&&c.extendFlat(l,s(r,i,a,h,r.dxyda_rough(u,f)));v(t,e,r,n,h,p,r.baxis,i,a,l,\"b-title\")}(t,_,h,i,l,u,w,T),function(t,e,r,n,i){var s,l,u,f,h=r.select(\"#\"+t._clipPathId);h.size()||(h=r.append(\"clipPath\").classed(\"carpetclip\",!0));var p=c.ensureSingle(h,\"path\",\"carpetboundary\"),d=e.clipsegments,g=[];for(f=0;f90&&y<270,b=n.select(this);b.text(h.title.text).call(l.convertToTspans,t),x&&(_=(-l.lineCount(b)+m)*g*a-_),b.attr(\"transform\",f(e.p[0],e.p[1])+u(e.angle)+f(0,_)).attr(\"text-anchor\",\"middle\").call(i.font,h.title.font)})),b.exit().remove()}},{\"../../components/drawing\":665,\"../../constants/alignment\":745,\"../../lib\":778,\"../../lib/svg_text_utils\":803,\"./makepath\":982,\"./map_1d_array\":983,\"./orient_text\":984,d3:169}],986:[function(t,e,r){\"use strict\";var n=t(\"./constants\"),i=t(\"../../lib/search\").findBin,a=t(\"./compute_control_points\"),o=t(\"./create_spline_evaluator\"),s=t(\"./create_i_derivative_evaluator\"),l=t(\"./create_j_derivative_evaluator\");e.exports=function(t){var e=t._a,r=t._b,c=e.length,u=r.length,f=t.aaxis,h=t.baxis,p=e[0],d=e[c-1],g=r[0],m=r[u-1],v=e[e.length-1]-e[0],y=r[r.length-1]-r[0],x=v*n.RELATIVE_CULL_TOLERANCE,b=y*n.RELATIVE_CULL_TOLERANCE;p-=x,d+=x,g-=b,m+=b,t.isVisible=function(t,e){return t>p&&tg&&ed||em},t.setScale=function(){var e=t._x,r=t._y,n=a(t._xctrl,t._yctrl,e,r,f.smoothing,h.smoothing);t._xctrl=n[0],t._yctrl=n[1],t.evalxy=o([t._xctrl,t._yctrl],c,u,f.smoothing,h.smoothing),t.dxydi=s([t._xctrl,t._yctrl],f.smoothing,h.smoothing),t.dxydj=l([t._xctrl,t._yctrl],f.smoothing,h.smoothing)},t.i2a=function(t){var r=Math.max(0,Math.floor(t[0]),c-2),n=t[0]-r;return(1-n)*e[r]+n*e[r+1]},t.j2b=function(t){var e=Math.max(0,Math.floor(t[1]),c-2),n=t[1]-e;return(1-n)*r[e]+n*r[e+1]},t.ij2ab=function(e){return[t.i2a(e[0]),t.j2b(e[1])]},t.a2i=function(t){var r=Math.max(0,Math.min(i(t,e),c-2)),n=e[r],a=e[r+1];return Math.max(0,Math.min(c-1,r+(t-n)/(a-n)))},t.b2j=function(t){var e=Math.max(0,Math.min(i(t,r),u-2)),n=r[e],a=r[e+1];return Math.max(0,Math.min(u-1,e+(t-n)/(a-n)))},t.ab2ij=function(e){return[t.a2i(e[0]),t.b2j(e[1])]},t.i2c=function(e,r){return t.evalxy([],e,r)},t.ab2xy=function(n,i,a){if(!a&&(ne[c-1]|ir[u-1]))return[!1,!1];var o=t.a2i(n),s=t.b2j(i),l=t.evalxy([],o,s);if(a){var f,h,p,d,g=0,m=0,v=[];ne[c-1]?(f=c-2,h=1,g=(n-e[c-1])/(e[c-1]-e[c-2])):h=o-(f=Math.max(0,Math.min(c-2,Math.floor(o)))),ir[u-1]?(p=u-2,d=1,m=(i-r[u-1])/(r[u-1]-r[u-2])):d=s-(p=Math.max(0,Math.min(u-2,Math.floor(s)))),g&&(t.dxydi(v,f,p,h,d),l[0]+=v[0]*g,l[1]+=v[1]*g),m&&(t.dxydj(v,f,p,h,d),l[0]+=v[0]*m,l[1]+=v[1]*m)}return l},t.c2p=function(t,e,r){return[e.c2p(t[0]),r.c2p(t[1])]},t.p2x=function(t,e,r){return[e.p2c(t[0]),r.p2c(t[1])]},t.dadi=function(t){var r=Math.max(0,Math.min(e.length-2,t));return e[r+1]-e[r]},t.dbdj=function(t){var e=Math.max(0,Math.min(r.length-2,t));return r[e+1]-r[e]},t.dxyda=function(e,r,n,i){var a=t.dxydi(null,e,r,n,i),o=t.dadi(e,n);return[a[0]/o,a[1]/o]},t.dxydb=function(e,r,n,i){var a=t.dxydj(null,e,r,n,i),o=t.dbdj(r,i);return[a[0]/o,a[1]/o]},t.dxyda_rough=function(e,r,n){var i=v*(n||.1),a=t.ab2xy(e+i,r,!0),o=t.ab2xy(e-i,r,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},t.dxydb_rough=function(e,r,n){var i=y*(n||.1),a=t.ab2xy(e,r+i,!0),o=t.ab2xy(e,r-i,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},t.dpdx=function(t){return t._m},t.dpdy=function(t){return t._m}}},{\"../../lib/search\":798,\"./compute_control_points\":974,\"./constants\":975,\"./create_i_derivative_evaluator\":976,\"./create_j_derivative_evaluator\":977,\"./create_spline_evaluator\":978}],987:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e,r){var i,a,o,s=[],l=[],c=t[0].length,u=t.length;function f(e,r){var n,i=0,a=0;return e>0&&void 0!==(n=t[r][e-1])&&(a++,i+=n),e0&&void 0!==(n=t[r-1][e])&&(a++,i+=n),r0&&a0&&i1e-5);return n.log(\"Smoother converged to\",k,\"after\",M,\"iterations\"),t}},{\"../../lib\":778}],988:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isArray1D;e.exports=function(t,e,r){var i=r(\"x\"),a=i&&i.length,o=r(\"y\"),s=o&&o.length;if(!a&&!s)return!1;if(e._cheater=!i,a&&!n(i)||s&&!n(o))e._length=null;else{var l=a?i.length:1/0;s&&(l=Math.min(l,o.length)),e.a&&e.a.length&&(l=Math.min(l,e.a.length)),e.b&&e.b.length&&(l=Math.min(l,e.b.length)),e._length=l}return!0}},{\"../../lib\":778}],989:[function(t,e,r){\"use strict\";var n=t(\"../../plots/template_attributes\").hovertemplateAttrs,i=t(\"../scattergeo/attributes\"),a=t(\"../../components/colorscale/attributes\"),o=t(\"../../plots/attributes\"),s=t(\"../../components/color/attributes\").defaultLine,l=t(\"../../lib/extend\").extendFlat,c=i.marker.line;e.exports=l({locations:{valType:\"data_array\",editType:\"calc\"},locationmode:i.locationmode,z:{valType:\"data_array\",editType:\"calc\"},geojson:l({},i.geojson,{}),featureidkey:i.featureidkey,text:l({},i.text,{}),hovertext:l({},i.hovertext,{}),marker:{line:{color:l({},c.color,{dflt:s}),width:l({},c.width,{dflt:1}),editType:\"calc\"},opacity:{valType:\"number\",arrayOk:!0,min:0,max:1,dflt:1,editType:\"style\"},editType:\"calc\"},selected:{marker:{opacity:i.selected.marker.opacity,editType:\"plot\"},editType:\"plot\"},unselected:{marker:{opacity:i.unselected.marker.opacity,editType:\"plot\"},editType:\"plot\"},hoverinfo:l({},o.hoverinfo,{editType:\"calc\",flags:[\"location\",\"z\",\"text\",\"name\"]}),hovertemplate:n(),showlegend:l({},o.showlegend,{dflt:!1})},a(\"\",{cLetter:\"z\",editTypeOverride:\"calc\"}))},{\"../../components/color/attributes\":642,\"../../components/colorscale/attributes\":650,\"../../lib/extend\":768,\"../../plots/attributes\":824,\"../../plots/template_attributes\":906,\"../scattergeo/attributes\":1229}],990:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../constants/numerical\").BADNUM,a=t(\"../../components/colorscale/calc\"),o=t(\"../scatter/arrays_to_calcdata\"),s=t(\"../scatter/calc_selection\");function l(t){return t&&\"string\"==typeof t}e.exports=function(t,e){var r,c=e._length,u=new Array(c);r=e.geojson?function(t){return l(t)||n(t)}:l;for(var f=0;f\")}(t,f,o),[t]}},{\"../../lib\":778,\"../../plots/cartesian/axes\":828,\"./attributes\":989}],994:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../heatmap/colorbar\"),calc:t(\"./calc\"),calcGeoJSON:t(\"./plot\").calcGeoJSON,plot:t(\"./plot\").plot,style:t(\"./style\").style,styleOnSelect:t(\"./style\").styleOnSelect,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),moduleType:\"trace\",name:\"choropleth\",basePlotModule:t(\"../../plots/geo\"),categories:[\"geo\",\"noOpacity\",\"showLegend\"],meta:{}}},{\"../../plots/geo\":860,\"../heatmap/colorbar\":1068,\"./attributes\":989,\"./calc\":990,\"./defaults\":991,\"./event_data\":992,\"./hover\":993,\"./plot\":995,\"./select\":996,\"./style\":997}],995:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../lib\"),a=t(\"../../lib/geo_location_utils\"),o=t(\"../../lib/topojson_utils\").getTopojsonFeatures,s=t(\"../../plots/cartesian/autorange\").findExtremes,l=t(\"./style\").style;e.exports={calcGeoJSON:function(t,e){for(var r=t[0].trace,n=e[r.geo],i=n._subplot,l=r.locationmode,c=r._length,u=\"geojson-id\"===l?a.extractTraceFeature(t):o(r,i.topojson),f=[],h=[],p=0;p=0;n--){var i=r[n].id;if(\"string\"==typeof i&&0===i.indexOf(\"water\"))for(var a=n+1;a=0;r--)t.removeLayer(e[r][1])},s.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},e.exports=function(t,e){var r=e[0].trace,i=new o(t,r.uid),a=i.sourceId,s=n(e),l=i.below=t.belowLookup[\"trace-\"+r.uid];return t.map.addSource(a,{type:\"geojson\",data:s.geojson}),i._addLayers(s,l),e[0].trace._glTrace=i,i}},{\"../../plots/mapbox/constants\":883,\"./convert\":999}],1003:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/template_attributes\").hovertemplateAttrs,a=t(\"../mesh3d/attributes\"),o=t(\"../../plots/attributes\"),s=t(\"../../lib/extend\").extendFlat,l={x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},z:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},u:{valType:\"data_array\",editType:\"calc\"},v:{valType:\"data_array\",editType:\"calc\"},w:{valType:\"data_array\",editType:\"calc\"},sizemode:{valType:\"enumerated\",values:[\"scaled\",\"absolute\"],editType:\"calc\",dflt:\"scaled\"},sizeref:{valType:\"number\",editType:\"calc\",min:0},anchor:{valType:\"enumerated\",editType:\"calc\",values:[\"tip\",\"tail\",\"cm\",\"center\"],dflt:\"cm\"},text:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertemplate:i({editType:\"calc\"},{keys:[\"norm\"]}),showlegend:s({},o.showlegend,{dflt:!1})};s(l,n(\"\",{colorAttr:\"u/v/w norm\",showScaleDflt:!0,editTypeOverride:\"calc\"}));[\"opacity\",\"lightposition\",\"lighting\"].forEach((function(t){l[t]=a[t]})),l.hoverinfo=s({},o.hoverinfo,{editType:\"calc\",flags:[\"x\",\"y\",\"z\",\"u\",\"v\",\"w\",\"norm\",\"text\",\"name\"],dflt:\"x+y+z+norm+text+name\"}),l.transforms=void 0,e.exports=l},{\"../../components/colorscale/attributes\":650,\"../../lib/extend\":768,\"../../plots/attributes\":824,\"../../plots/template_attributes\":906,\"../mesh3d/attributes\":1128}],1004:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\");e.exports=function(t,e){for(var r=e.u,i=e.v,a=e.w,o=Math.min(e.x.length,e.y.length,e.z.length,r.length,i.length,a.length),s=-1/0,l=1/0,c=0;co.level||o.starts.length&&a===o.level)}break;case\"constraint\":if(n.prefixBoundary=!1,n.edgepaths.length)return;var s=n.x.length,l=n.y.length,c=-1/0,u=1/0;for(r=0;r\":p>c&&(n.prefixBoundary=!0);break;case\"<\":(pc||n.starts.length&&h===u)&&(n.prefixBoundary=!0);break;case\"][\":f=Math.min(p[0],p[1]),h=Math.max(p[0],p[1]),fc&&(n.prefixBoundary=!0)}}}},{}],1011:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale\"),i=t(\"./make_color_map\"),a=t(\"./end_plus\");e.exports={min:\"zmin\",max:\"zmax\",calc:function(t,e,r){var o=e.contours,s=e.line,l=o.size||1,c=o.coloring,u=i(e,{isColorbar:!0});if(\"heatmap\"===c){var f=n.extractOpts(e);r._fillgradient=f.reversescale?n.flipScale(f.colorscale):f.colorscale,r._zrange=[f.min,f.max]}else\"fill\"===c&&(r._fillcolor=u);r._line={color:\"lines\"===c?u:s.color,width:!1!==o.showlines?s.width:0,dash:s.dash},r._levels={start:o.start,end:a(o),size:l}}}},{\"../../components/colorscale\":655,\"./end_plus\":1019,\"./make_color_map\":1024}],1012:[function(t,e,r){\"use strict\";e.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}},{}],1013:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"./label_defaults\"),a=t(\"../../components/color\"),o=a.addOpacity,s=a.opacity,l=t(\"../../constants/filter_ops\"),c=l.CONSTRAINT_REDUCTION,u=l.COMPARISON_OPS2;e.exports=function(t,e,r,a,l,f){var h,p,d,g=e.contours,m=r(\"contours.operation\");(g._operation=c[m],function(t,e){var r;-1===u.indexOf(e.operation)?(t(\"contours.value\",[0,1]),Array.isArray(e.value)?e.value.length>2?e.value=e.value.slice(2):0===e.length?e.value=[0,1]:e.length<2?(r=parseFloat(e.value[0]),e.value=[r,r+1]):e.value=[parseFloat(e.value[0]),parseFloat(e.value[1])]:n(e.value)&&(r=parseFloat(e.value),e.value=[r,r+1])):(t(\"contours.value\",0),n(e.value)||(Array.isArray(e.value)?e.value=parseFloat(e.value[0]):e.value=0))}(r,g),\"=\"===m?h=g.showlines=!0:(h=r(\"contours.showlines\"),d=r(\"fillcolor\",o((t.line||{}).color||l,.5))),h)&&(p=r(\"line.color\",d&&s(d)?o(e.fillcolor,1):l),r(\"line.width\",2),r(\"line.dash\"));r(\"line.smoothing\"),i(r,a,p,f)}},{\"../../components/color\":643,\"../../constants/filter_ops\":749,\"./label_defaults\":1023,\"fast-isnumeric\":241}],1014:[function(t,e,r){\"use strict\";var n=t(\"../../constants/filter_ops\"),i=t(\"fast-isnumeric\");function a(t,e){var r,a=Array.isArray(e);function o(t){return i(t)?+t:null}return-1!==n.COMPARISON_OPS2.indexOf(t)?r=o(a?e[0]:e):-1!==n.INTERVAL_OPS.indexOf(t)?r=a?[o(e[0]),o(e[1])]:[o(e),o(e)]:-1!==n.SET_OPS.indexOf(t)&&(r=a?e.map(o):[o(e)]),r}function o(t){return function(e){e=a(t,e);var r=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return{start:r,end:n,size:n-r}}}function s(t){return function(e){return{start:e=a(t,e),end:1/0,size:1/0}}}e.exports={\"[]\":o(\"[]\"),\"][\":o(\"][\"),\">\":s(\">\"),\"<\":s(\"<\"),\"=\":s(\"=\")}},{\"../../constants/filter_ops\":749,\"fast-isnumeric\":241}],1015:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n){var i=n(\"contours.start\"),a=n(\"contours.end\"),o=!1===i||!1===a,s=r(\"contours.size\");!(o?e.autocontour=!0:r(\"autocontour\",!1))&&s||r(\"ncontours\")}},{}],1016:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");function i(t){return n.extendFlat({},t,{edgepaths:n.extendDeep([],t.edgepaths),paths:n.extendDeep([],t.paths),starts:n.extendDeep([],t.starts)})}e.exports=function(t,e){var r,a,o,s=function(t){return t.reverse()},l=function(t){return t};switch(e){case\"=\":case\"<\":return t;case\">\":for(1!==t.length&&n.warn(\"Contour data invalid for the specified inequality operation.\"),a=t[0],r=0;r1e3){n.warn(\"Too many contours, clipping at 1000\",t);break}return l}},{\"../../lib\":778,\"./constraint_mapping\":1014,\"./end_plus\":1019}],1019:[function(t,e,r){\"use strict\";e.exports=function(t){return t.end+t.size/1e6}},{}],1020:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./constants\");function a(t,e,r,n){return Math.abs(t[0]-e[0])20&&e?208===t||1114===t?n=0===r[0]?1:-1:a=0===r[1]?1:-1:-1!==i.BOTTOMSTART.indexOf(t)?a=1:-1!==i.LEFTSTART.indexOf(t)?n=1:-1!==i.TOPSTART.indexOf(t)?a=-1:n=-1;return[n,a]}(f,r,e),p=[s(t,e,[-h[0],-h[1]])],d=t.z.length,g=t.z[0].length,m=e.slice(),v=h.slice();for(c=0;c<1e4;c++){if(f>20?(f=i.CHOOSESADDLE[f][(h[0]||h[1])<0?0:1],t.crossings[u]=i.SADDLEREMAINDER[f]):delete t.crossings[u],!(h=i.NEWDELTA[f])){n.log(\"Found bad marching index:\",f,e,t.level);break}p.push(s(t,e,h)),e[0]+=h[0],e[1]+=h[1],u=e.join(\",\"),a(p[p.length-1],p[p.length-2],o,l)&&p.pop();var y=h[0]&&(e[0]<0||e[0]>g-2)||h[1]&&(e[1]<0||e[1]>d-2);if(e[0]===m[0]&&e[1]===m[1]&&h[0]===v[0]&&h[1]===v[1]||r&&y)break;f=t.crossings[u]}1e4===c&&n.log(\"Infinite loop in contour?\");var x,b,_,w,T,k,M,A,S,E,C,L,I,P,z,O=a(p[0],p[p.length-1],o,l),D=0,R=.2*t.smoothing,F=[],B=0;for(c=1;c=B;c--)if((x=F[c])=B&&x+F[b]A&&S--,t.edgepaths[S]=C.concat(p,E));break}V||(t.edgepaths[A]=p.concat(E))}for(A=0;At?0:1)+(e[0][1]>t?0:2)+(e[1][1]>t?0:4)+(e[1][0]>t?0:8);return 5===r||10===r?t>(e[0][0]+e[0][1]+e[1][0]+e[1][1])/4?5===r?713:1114:5===r?104:208:15===r?0:r}e.exports=function(t){var e,r,a,o,s,l,c,u,f,h=t[0].z,p=h.length,d=h[0].length,g=2===p||2===d;for(r=0;r=0&&(n=y,s=l):Math.abs(r[1]-n[1])<.01?Math.abs(r[1]-y[1])<.01&&(y[0]-r[0])*(n[0]-y[0])>=0&&(n=y,s=l):i.log(\"endpt to newendpt is not vert. or horz.\",r,n,y)}if(r=n,s>=0)break;f+=\"L\"+n}if(s===t.edgepaths.length){i.log(\"unclosed perimeter path\");break}h=s,(d=-1===p.indexOf(h))&&(h=p[0],f+=\"Z\")}for(h=0;hn.center?n.right-s:s-n.left)/(u+Math.abs(Math.sin(c)*o)),p=(l>n.middle?n.bottom-l:l-n.top)/(Math.abs(f)+Math.cos(c)*o);if(h<1||p<1)return 1/0;var d=v.EDGECOST*(1/(h-1)+1/(p-1));d+=v.ANGLECOST*c*c;for(var g=s-u,m=l-f,y=s+u,x=l+f,b=0;b2*v.MAXCOST)break;p&&(s/=2),l=(o=c-s/2)+1.5*s}if(h<=v.MAXCOST)return u},r.addLabelData=function(t,e,r,n){var i=e.fontSize,a=e.width+i/3,o=Math.max(0,e.height-i/3),s=t.x,l=t.y,c=t.theta,u=Math.sin(c),f=Math.cos(c),h=function(t,e){return[s+t*f-e*u,l+t*u+e*f]},p=[h(-a/2,-o/2),h(-a/2,o/2),h(a/2,o/2),h(a/2,-o/2)];r.push({text:e.text,x:s,y:l,dy:e.dy,theta:c,level:e.level,width:a,height:o}),n.push(p)},r.drawLabels=function(t,e,r,a,o){var l=t.selectAll(\"text\").data(e,(function(t){return t.text+\",\"+t.x+\",\"+t.y+\",\"+t.theta}));if(l.exit().remove(),l.enter().append(\"text\").attr({\"data-notex\":1,\"text-anchor\":\"middle\"}).each((function(t){var e=t.x+Math.sin(t.theta)*t.dy,i=t.y-Math.cos(t.theta)*t.dy;n.select(this).text(t.text).attr({x:e,y:i,transform:\"rotate(\"+180*t.theta/Math.PI+\" \"+e+\" \"+i+\")\"}).call(s.convertToTspans,r)})),o){for(var c=\"\",u=0;ur.end&&(r.start=r.end=(r.start+r.end)/2),t._input.contours||(t._input.contours={}),i.extendFlat(t._input.contours,{start:r.start,end:r.end,size:r.size}),t._input.autocontour=!0}else if(\"constraint\"!==r.type){var c,u=r.start,f=r.end,h=t._input.contours;if(u>f&&(r.start=h.start=f,f=r.end=h.end=u,u=r.start),!(r.size>0))c=u===f?1:a(u,f,t.ncontours).dtick,h.size=r.size=c}}},{\"../../lib\":778,\"../../plots/cartesian/axes\":828}],1028:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../components/drawing\"),a=t(\"../heatmap/style\"),o=t(\"./make_color_map\");e.exports=function(t){var e=n.select(t).selectAll(\"g.contour\");e.style(\"opacity\",(function(t){return t[0].trace.opacity})),e.each((function(t){var e=n.select(this),r=t[0].trace,a=r.contours,s=r.line,l=a.size||1,c=a.start,u=\"constraint\"===a.type,f=!u&&\"lines\"===a.coloring,h=!u&&\"fill\"===a.coloring,p=f||h?o(r):null;e.selectAll(\"g.contourlevel\").each((function(t){n.select(this).selectAll(\"path\").call(i.lineGroupStyle,s.width,f?p(t.level):s.color,s.dash)}));var d=a.labelfont;if(e.selectAll(\"g.contourlabels text\").each((function(t){i.font(n.select(this),{family:d.family,size:d.size,color:d.color||(f?p(t.level):s.color)})})),u)e.selectAll(\"g.contourfill path\").style(\"fill\",r.fillcolor);else if(h){var g;e.selectAll(\"g.contourfill path\").style(\"fill\",(function(t){return void 0===g&&(g=t.level),p(t.level+.5*l)})),void 0===g&&(g=c),e.selectAll(\"g.contourbg path\").style(\"fill\",p(g-.5*l))}})),a(t)}},{\"../../components/drawing\":665,\"../heatmap/style\":1077,\"./make_color_map\":1024,d3:169}],1029:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/defaults\"),i=t(\"./label_defaults\");e.exports=function(t,e,r,a,o){var s,l=r(\"contours.coloring\"),c=\"\";\"fill\"===l&&(s=r(\"contours.showlines\")),!1!==s&&(\"lines\"!==l&&(c=r(\"line.color\",\"#000\")),r(\"line.width\",.5),r(\"line.dash\")),\"none\"!==l&&(!0!==t.showlegend&&(e.showlegend=!1),e._dfltShowLegend=!1,n(t,e,a,r,{prefix:\"\",cLetter:\"z\"})),r(\"line.smoothing\"),i(r,a,c,o)}},{\"../../components/colorscale/defaults\":653,\"./label_defaults\":1023}],1030:[function(t,e,r){\"use strict\";var n=t(\"../heatmap/attributes\"),i=t(\"../contour/attributes\"),a=t(\"../../components/colorscale/attributes\"),o=t(\"../../lib/extend\").extendFlat,s=i.contours;e.exports=o({carpet:{valType:\"string\",editType:\"calc\"},z:n.z,a:n.x,a0:n.x0,da:n.dx,b:n.y,b0:n.y0,db:n.dy,text:n.text,hovertext:n.hovertext,transpose:n.transpose,atype:n.xtype,btype:n.ytype,fillcolor:i.fillcolor,autocontour:i.autocontour,ncontours:i.ncontours,contours:{type:s.type,start:s.start,end:s.end,size:s.size,coloring:{valType:\"enumerated\",values:[\"fill\",\"lines\",\"none\"],dflt:\"fill\",editType:\"calc\"},showlines:s.showlines,showlabels:s.showlabels,labelfont:s.labelfont,labelformat:s.labelformat,operation:s.operation,value:s.value,editType:\"calc\",impliedEdits:{autocontour:!1}},line:{color:i.line.color,width:i.line.width,dash:i.line.dash,smoothing:i.line.smoothing,editType:\"plot\"},transforms:void 0},a(\"\",{cLetter:\"z\",autoColorDflt:!1}))},{\"../../components/colorscale/attributes\":650,\"../../lib/extend\":768,\"../contour/attributes\":1008,\"../heatmap/attributes\":1065}],1031:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\"),i=t(\"../../lib\"),a=t(\"../heatmap/convert_column_xyz\"),o=t(\"../heatmap/clean_2d_array\"),s=t(\"../heatmap/interp2d\"),l=t(\"../heatmap/find_empties\"),c=t(\"../heatmap/make_bound_array\"),u=t(\"./defaults\"),f=t(\"../carpet/lookup_carpetid\"),h=t(\"../contour/set_contours\");e.exports=function(t,e){var r=e._carpetTrace=f(t,e);if(r&&r.visible&&\"legendonly\"!==r.visible){if(!e.a||!e.b){var p=t.data[r.index],d=t.data[e.index];d.a||(d.a=p.a),d.b||(d.b=p.b),u(d,e,e._defaultColor,t._fullLayout)}var g=function(t,e){var r,u,f,h,p,d,g,m=e._carpetTrace,v=m.aaxis,y=m.baxis;v._minDtick=0,y._minDtick=0,i.isArray1D(e.z)&&a(e,v,y,\"a\",\"b\",[\"z\"]);r=e._a=e._a||e.a,h=e._b=e._b||e.b,r=r?v.makeCalcdata(e,\"_a\"):[],h=h?y.makeCalcdata(e,\"_b\"):[],u=e.a0||0,f=e.da||1,p=e.b0||0,d=e.db||1,g=e._z=o(e._z||e.z,e.transpose),e._emptypoints=l(g),s(g,e._emptypoints);var x=i.maxRowLength(g),b=\"scaled\"===e.xtype?\"\":r,_=c(e,b,u,f,x,v),w=\"scaled\"===e.ytype?\"\":h,T=c(e,w,p,d,g.length,y),k={a:_,b:T,z:g};\"levels\"===e.contours.type&&\"none\"!==e.contours.coloring&&n(t,e,{vals:g,containerStr:\"\",cLetter:\"z\"});return[k]}(t,e);return h(e,e._z),g}}},{\"../../components/colorscale/calc\":651,\"../../lib\":778,\"../carpet/lookup_carpetid\":981,\"../contour/set_contours\":1027,\"../heatmap/clean_2d_array\":1067,\"../heatmap/convert_column_xyz\":1069,\"../heatmap/find_empties\":1071,\"../heatmap/interp2d\":1074,\"../heatmap/make_bound_array\":1075,\"./defaults\":1032}],1032:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../heatmap/xyz_defaults\"),a=t(\"./attributes\"),o=t(\"../contour/constraint_defaults\"),s=t(\"../contour/contours_defaults\"),l=t(\"../contour/style_defaults\");e.exports=function(t,e,r,c){function u(r,i){return n.coerce(t,e,a,r,i)}if(u(\"carpet\"),t.a&&t.b){if(!i(t,e,u,c,\"a\",\"b\"))return void(e.visible=!1);u(\"text\"),\"constraint\"===u(\"contours.type\")?o(t,e,u,c,r,{hasHover:!1}):(s(t,e,u,(function(r){return n.coerce2(t,e,a,r)})),l(t,e,u,c,{hasHover:!1}))}else e._defaultColor=r,e._length=null}},{\"../../lib\":778,\"../contour/constraint_defaults\":1013,\"../contour/contours_defaults\":1015,\"../contour/style_defaults\":1029,\"../heatmap/xyz_defaults\":1079,\"./attributes\":1030}],1033:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../contour/colorbar\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../contour/style\"),moduleType:\"trace\",name:\"contourcarpet\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"carpet\",\"contour\",\"symbols\",\"showLegend\",\"hasLines\",\"carpetDependent\",\"noHover\",\"noSortingByValue\"],meta:{}}},{\"../../plots/cartesian\":841,\"../contour/colorbar\":1011,\"../contour/style\":1028,\"./attributes\":1030,\"./calc\":1031,\"./defaults\":1032,\"./plot\":1034}],1034:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../carpet/map_1d_array\"),a=t(\"../carpet/makepath\"),o=t(\"../../components/drawing\"),s=t(\"../../lib\"),l=t(\"../contour/make_crossings\"),c=t(\"../contour/find_all_paths\"),u=t(\"../contour/plot\"),f=t(\"../contour/constants\"),h=t(\"../contour/convert_to_constraints\"),p=t(\"../contour/empty_pathinfo\"),d=t(\"../contour/close_boundaries\"),g=t(\"../carpet/lookup_carpetid\"),m=t(\"../carpet/axis_aligned_line\");function v(t,e,r){var n=t.getPointAtLength(e),i=t.getPointAtLength(r),a=i.x-n.x,o=i.y-n.y,s=Math.sqrt(a*a+o*o);return[a/s,o/s]}function y(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}function x(t,e){var r=Math.abs(t[0]*e[0]+t[1]*e[1]);return Math.sqrt(1-r*r)/r}e.exports=function(t,e,r,b){var _=e.xaxis,w=e.yaxis;s.makeTraceGroups(b,r,\"contour\").each((function(r){var b=n.select(this),T=r[0],k=T.trace,M=k._carpetTrace=g(t,k),A=t.calcdata[M.index][0];if(M.visible&&\"legendonly\"!==M.visible){var S=T.a,E=T.b,C=k.contours,L=p(C,e,T),I=\"constraint\"===C.type,P=C._operation,z=I?\"=\"===P?\"lines\":\"fill\":C.coloring,O=[[S[0],E[E.length-1]],[S[S.length-1],E[E.length-1]],[S[S.length-1],E[0]],[S[0],E[0]]];l(L);var D=1e-8*(S[S.length-1]-S[0]),R=1e-8*(E[E.length-1]-E[0]);c(L,D,R);var F,B,N,j,U=L;\"constraint\"===C.type&&(U=h(L,P)),function(t,e){var r,n,i,a,o,s,l,c,u;for(r=0;r=0;j--)F=A.clipsegments[j],B=i([],F.x,_.c2p),N=i([],F.y,w.c2p),B.reverse(),N.reverse(),V.push(a(B,N,F.bicubic));var q=\"M\"+V.join(\"L\")+\"Z\";!function(t,e,r,n,o,l){var c,u,f,h,p=s.ensureSingle(t,\"g\",\"contourbg\").selectAll(\"path\").data(\"fill\"!==l||o?[]:[0]);p.enter().append(\"path\"),p.exit().remove();var d=[];for(h=0;h=0&&(h=C,d=g):Math.abs(f[1]-h[1])=0&&(h=C,d=g):s.log(\"endpt to newendpt is not vert. or horz.\",f,h,C)}if(d>=0)break;y+=S(f,h),f=h}if(d===e.edgepaths.length){s.log(\"unclosed perimeter path\");break}u=d,(b=-1===x.indexOf(u))&&(u=x[0],y+=S(f,h)+\"Z\",f=null)}for(u=0;um&&(n.max=m);n.len=n.max-n.min}(this,r,t,n,c,e.height),!(n.len<(e.width+e.height)*f.LABELMIN)))for(var i=Math.min(Math.ceil(n.len/P),f.LABELMAX),a=0;a0?+p[u]:0),f.push({type:\"Feature\",geometry:{type:\"Point\",coordinates:v},properties:y})}}var b=o.extractOpts(e),_=b.reversescale?o.flipScale(b.colorscale):b.colorscale,w=_[0][1],T=[\"interpolate\",[\"linear\"],[\"heatmap-density\"],0,a.opacity(w)<1?w:a.addOpacity(w,0)];for(u=1;u<_.length;u++)T.push(_[u][0],_[u][1]);var k=[\"interpolate\",[\"linear\"],[\"get\",\"z\"],b.min,0,b.max,1];return i.extendFlat(c.heatmap.paint,{\"heatmap-weight\":d?k:1/(b.max-b.min),\"heatmap-color\":T,\"heatmap-radius\":g?{type:\"identity\",property:\"r\"}:e.radius,\"heatmap-opacity\":e.opacity}),c.geojson={type:\"FeatureCollection\",features:f},c.heatmap.layout.visibility=\"visible\",c}},{\"../../components/color\":643,\"../../components/colorscale\":655,\"../../constants/numerical\":753,\"../../lib\":778,\"../../lib/geojson_utils\":772,\"fast-isnumeric\":241}],1038:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/colorscale/defaults\"),a=t(\"./attributes\");e.exports=function(t,e,r,o){function s(r,i){return n.coerce(t,e,a,r,i)}var l=s(\"lon\")||[],c=s(\"lat\")||[],u=Math.min(l.length,c.length);u?(e._length=u,s(\"z\"),s(\"radius\"),s(\"below\"),s(\"text\"),s(\"hovertext\"),s(\"hovertemplate\"),i(t,e,o,s,{prefix:\"\",cLetter:\"z\"})):e.visible=!1}},{\"../../components/colorscale/defaults\":653,\"../../lib\":778,\"./attributes\":1035}],1039:[function(t,e,r){\"use strict\";e.exports=function(t,e){return t.lon=e.lon,t.lat=e.lat,t.z=e.z,t}},{}],1040:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../scattermapbox/hover\");e.exports=function(t,e,r){var o=a(t,e,r);if(o){var s=o[0],l=s.cd,c=l[0].trace,u=l[s.index];if(delete s.color,\"z\"in u){var f=s.subplot.mockAxis;s.z=u.z,s.zLabel=i.tickText(f,f.c2l(u.z),\"hover\").text}return s.extraText=function(t,e,r){if(t.hovertemplate)return;var i=(e.hi||t.hoverinfo).split(\"+\"),a=-1!==i.indexOf(\"all\"),o=-1!==i.indexOf(\"lon\"),s=-1!==i.indexOf(\"lat\"),l=e.lonlat,c=[];function u(t){return t+\"\\xb0\"}a||o&&s?c.push(\"(\"+u(l[0])+\", \"+u(l[1])+\")\"):o?c.push(r.lon+u(l[0])):s&&c.push(r.lat+u(l[1]));(a||-1!==i.indexOf(\"text\"))&&n.fillText(e,t,c);return c.join(\"
\")}(c,u,l[0].t.labels),[s]}}},{\"../../lib\":778,\"../../plots/cartesian/axes\":828,\"../scattermapbox/hover\":1257}],1041:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../heatmap/colorbar\"),formatLabels:t(\"../scattermapbox/format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),getBelow:function(t,e){for(var r=e.getMapLayers(),n=0;n=0;r--)t.removeLayer(e[r][1])},o.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},e.exports=function(t,e){var r=e[0].trace,i=new a(t,r.uid),o=i.sourceId,s=n(e),l=i.below=t.belowLookup[\"trace-\"+r.uid];return t.map.addSource(o,{type:\"geojson\",data:s.geojson}),i._addLayers(s,l),i}},{\"../../plots/mapbox/constants\":883,\"./convert\":1037}],1043:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){for(var r=0;r\"),s.color=function(t,e){var r=t.marker,i=e.mc||r.color,a=e.mlc||r.line.color,o=e.mlw||r.line.width;if(n(i))return i;if(n(a)&&o)return a}(c,f),[s]}}},{\"../../components/color\":643,\"../../lib\":778,\"../bar/hover\":928}],1051:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,crossTraceDefaults:t(\"./defaults\").crossTraceDefaults,supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\"),crossTraceCalc:t(\"./cross_trace_calc\"),plot:t(\"./plot\"),style:t(\"./style\").style,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"../bar/select\"),moduleType:\"trace\",name:\"funnel\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"bar-like\",\"cartesian\",\"svg\",\"oriented\",\"showLegend\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":841,\"../bar/select\":933,\"./attributes\":1044,\"./calc\":1045,\"./cross_trace_calc\":1047,\"./defaults\":1048,\"./event_data\":1049,\"./hover\":1050,\"./layout_attributes\":1052,\"./layout_defaults\":1053,\"./plot\":1054,\"./style\":1055}],1052:[function(t,e,r){\"use strict\";e.exports={funnelmode:{valType:\"enumerated\",values:[\"stack\",\"group\",\"overlay\"],dflt:\"stack\",editType:\"calc\"},funnelgap:{valType:\"number\",min:0,max:1,editType:\"calc\"},funnelgroupgap:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"}}},{}],1053:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e,r){var a=!1;function o(r,a){return n.coerce(t,e,i,r,a)}for(var s=0;s path\").each((function(t){if(!t.isBlank){var e=s.marker;n.select(this).call(a.fill,t.mc||e.color).call(a.stroke,t.mlc||e.line.color).call(i.dashLine,e.line.dash,t.mlw||e.line.width).style(\"opacity\",s.selectedpoints&&!t.selected?o:1)}})),c(r,s,t),r.selectAll(\".regions\").each((function(){n.select(this).selectAll(\"path\").style(\"stroke-width\",0).call(a.fill,s.connector.fillcolor)})),r.selectAll(\".lines\").each((function(){var t=s.connector.line;i.lineGroupStyle(n.select(this).selectAll(\"path\"),t.width,t.color,t.dash)}))}))}}},{\"../../components/color\":643,\"../../components/drawing\":665,\"../../constants/interactions\":752,\"../bar/style\":935,\"../bar/uniform_text\":937,d3:169}],1056:[function(t,e,r){\"use strict\";var n=t(\"../pie/attributes\"),i=t(\"../../plots/attributes\"),a=t(\"../../plots/domain\").attributes,o=t(\"../../plots/template_attributes\").hovertemplateAttrs,s=t(\"../../plots/template_attributes\").texttemplateAttrs,l=t(\"../../lib/extend\").extendFlat;e.exports={labels:n.labels,label0:n.label0,dlabel:n.dlabel,values:n.values,marker:{colors:n.marker.colors,line:{color:l({},n.marker.line.color,{dflt:null}),width:l({},n.marker.line.width,{dflt:1}),editType:\"calc\"},editType:\"calc\"},text:n.text,hovertext:n.hovertext,scalegroup:l({},n.scalegroup,{}),textinfo:l({},n.textinfo,{flags:[\"label\",\"text\",\"value\",\"percent\"]}),texttemplate:s({editType:\"plot\"},{keys:[\"label\",\"color\",\"value\",\"text\",\"percent\"]}),hoverinfo:l({},i.hoverinfo,{flags:[\"label\",\"text\",\"value\",\"percent\",\"name\"]}),hovertemplate:o({},{keys:[\"label\",\"color\",\"value\",\"text\",\"percent\"]}),textposition:l({},n.textposition,{values:[\"inside\",\"none\"],dflt:\"inside\"}),textfont:n.textfont,insidetextfont:n.insidetextfont,title:{text:n.title.text,font:n.title.font,position:l({},n.title.position,{values:[\"top left\",\"top center\",\"top right\"],dflt:\"top center\"}),editType:\"plot\"},domain:a({name:\"funnelarea\",trace:!0,editType:\"calc\"}),aspectratio:{valType:\"number\",min:0,dflt:1,editType:\"plot\"},baseratio:{valType:\"number\",min:0,max:1,dflt:.333,editType:\"plot\"}}},{\"../../lib/extend\":768,\"../../plots/attributes\":824,\"../../plots/domain\":855,\"../../plots/template_attributes\":906,\"../pie/attributes\":1161}],1057:[function(t,e,r){\"use strict\";var n=t(\"../../plots/plots\");r.name=\"funnelarea\",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{\"../../plots/plots\":891}],1058:[function(t,e,r){\"use strict\";var n=t(\"../pie/calc\");e.exports={calc:function(t,e){return n.calc(t,e)},crossTraceCalc:function(t){n.crossTraceCalc(t,{type:\"funnelarea\"})}}},{\"../pie/calc\":1163}],1059:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"../../plots/domain\").defaults,o=t(\"../bar/defaults\").handleText,s=t(\"../pie/defaults\").handleLabelsAndValues;e.exports=function(t,e,r,l){function c(r,a){return n.coerce(t,e,i,r,a)}var u=c(\"labels\"),f=c(\"values\"),h=s(u,f),p=h.len;if(e._hasLabels=h.hasLabels,e._hasValues=h.hasValues,!e._hasLabels&&e._hasValues&&(c(\"label0\"),c(\"dlabel\")),p){e._length=p,c(\"marker.line.width\")&&c(\"marker.line.color\",l.paper_bgcolor),c(\"marker.colors\"),c(\"scalegroup\");var d,g=c(\"text\"),m=c(\"texttemplate\");if(m||(d=c(\"textinfo\",Array.isArray(g)?\"text+percent\":\"percent\")),c(\"hovertext\"),c(\"hovertemplate\"),m||d&&\"none\"!==d){var v=c(\"textposition\");o(t,e,l,c,v,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}a(e,l,c),c(\"title.text\")&&(c(\"title.position\"),n.coerceFont(c,\"title.font\",l.font)),c(\"aspectratio\"),c(\"baseratio\")}else e.visible=!1}},{\"../../lib\":778,\"../../plots/domain\":855,\"../bar/defaults\":925,\"../pie/defaults\":1164,\"./attributes\":1056}],1060:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"funnelarea\",basePlotModule:t(\"./base_plot\"),categories:[\"pie-like\",\"funnelarea\",\"showLegend\"],attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\"),supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\").calc,crossTraceCalc:t(\"./calc\").crossTraceCalc,plot:t(\"./plot\"),style:t(\"./style\"),styleOne:t(\"../pie/style_one\"),meta:{}}},{\"../pie/style_one\":1172,\"./attributes\":1056,\"./base_plot\":1057,\"./calc\":1058,\"./defaults\":1059,\"./layout_attributes\":1061,\"./layout_defaults\":1062,\"./plot\":1063,\"./style\":1064}],1061:[function(t,e,r){\"use strict\";var n=t(\"../pie/layout_attributes\").hiddenlabels;e.exports={hiddenlabels:n,funnelareacolorway:{valType:\"colorlist\",editType:\"calc\"},extendfunnelareacolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}},{\"../pie/layout_attributes\":1168}],1062:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}r(\"hiddenlabels\"),r(\"funnelareacolorway\",e.colorway),r(\"extendfunnelareacolors\")}},{\"../../lib\":778,\"./layout_attributes\":1061}],1063:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../components/drawing\"),a=t(\"../../lib\"),o=a.strScale,s=a.strTranslate,l=t(\"../../lib/svg_text_utils\"),c=t(\"../bar/plot\").toMoveInsideBar,u=t(\"../bar/uniform_text\"),f=u.recordMinTextSize,h=u.clearMinTextSize,p=t(\"../pie/helpers\"),d=t(\"../pie/plot\"),g=d.attachFxHandlers,m=d.determineInsideTextFont,v=d.layoutAreas,y=d.prerenderTitles,x=d.positionTitleOutside,b=d.formatSliceLabel;function _(t,e){return\"l\"+(e[0]-t[0])+\",\"+(e[1]-t[1])}e.exports=function(t,e){var r=t._fullLayout;h(\"funnelarea\",r),y(e,t),v(e,r._size),a.makeTraceGroups(r._funnelarealayer,e,\"trace\").each((function(e){var u=n.select(this),h=e[0],d=h.trace;!function(t){if(!t.length)return;var e=t[0],r=e.trace,n=r.aspectratio,i=r.baseratio;i>.999&&(i=.999);var a,o=Math.pow(i,2),s=e.vTotal,l=s,c=s*o/(1-o)/s;function u(){var t,e={x:t=Math.sqrt(c),y:-t};return[e.x,e.y]}var f,h,p=[];for(p.push(u()),f=t.length-1;f>-1;f--)if(!(h=t[f]).hidden){var d=h.v/l;c+=d,p.push(u())}var g=1/0,m=-1/0;for(f=0;f-1;f--)if(!(h=t[f]).hidden){var M=p[k+=1][0],A=p[k][1];h.TL=[-M,A],h.TR=[M,A],h.BL=w,h.BR=T,h.pxmid=(S=h.TR,E=h.BR,[.5*(S[0]+E[0]),.5*(S[1]+E[1])]),w=h.TL,T=h.TR}var S,E}(e),u.each((function(){var u=n.select(this).selectAll(\"g.slice\").data(e);u.enter().append(\"g\").classed(\"slice\",!0),u.exit().remove(),u.each((function(o,s){if(o.hidden)n.select(this).selectAll(\"path,g\").remove();else{o.pointNumber=o.i,o.curveNumber=d.index;var u=h.cx,v=h.cy,y=n.select(this),x=y.selectAll(\"path.surface\").data([o]);x.enter().append(\"path\").classed(\"surface\",!0).style({\"pointer-events\":\"all\"}),y.call(g,t,e);var w=\"M\"+(u+o.TR[0])+\",\"+(v+o.TR[1])+_(o.TR,o.BR)+_(o.BR,o.BL)+_(o.BL,o.TL)+\"Z\";x.attr(\"d\",w),b(t,o,h);var T=p.castOption(d.textposition,o.pts),k=y.selectAll(\"g.slicetext\").data(o.text&&\"none\"!==T?[0]:[]);k.enter().append(\"g\").classed(\"slicetext\",!0),k.exit().remove(),k.each((function(){var h=a.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),p=a.ensureUniformFontSize(t,m(d,o,r.font));h.text(o.text).attr({class:\"slicetext\",transform:\"\",\"text-anchor\":\"middle\"}).call(i.font,p).call(l.convertToTspans,t);var g,y,x,b=i.bBox(h.node()),_=Math.min(o.BL[1],o.BR[1])+v,w=Math.max(o.TL[1],o.TR[1])+v;y=Math.max(o.TL[0],o.BL[0])+u,x=Math.min(o.TR[0],o.BR[0])+u,(g=c(y,x,_,w,b,{isHorizontal:!0,constrained:!0,angle:0,anchor:\"middle\"})).fontSize=p.size,f(d.type,g,r),e[s].transform=g,h.attr(\"transform\",a.getTextTransform(g))}))}}));var v=n.select(this).selectAll(\"g.titletext\").data(d.title.text?[0]:[]);v.enter().append(\"g\").classed(\"titletext\",!0),v.exit().remove(),v.each((function(){var e=a.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),c=d.title.text;d._meta&&(c=a.templateString(c,d._meta)),e.text(c).attr({class:\"titletext\",transform:\"\",\"text-anchor\":\"middle\"}).call(i.font,d.title.font).call(l.convertToTspans,t);var u=x(h,r._size);e.attr(\"transform\",s(u.x,u.y)+o(Math.min(1,u.scale))+s(u.tx,u.ty))}))}))}))}},{\"../../components/drawing\":665,\"../../lib\":778,\"../../lib/svg_text_utils\":803,\"../bar/plot\":932,\"../bar/uniform_text\":937,\"../pie/helpers\":1166,\"../pie/plot\":1170,d3:169}],1064:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../pie/style_one\"),a=t(\"../bar/uniform_text\").resizeText;e.exports=function(t){var e=t._fullLayout._funnelarealayer.selectAll(\".trace\");a(t,e,\"funnelarea\"),e.each((function(t){var e=t[0].trace,r=n.select(this);r.style({opacity:e.opacity}),r.selectAll(\"path.surface\").each((function(t){n.select(this).call(i,t,e)}))}))}},{\"../bar/uniform_text\":937,\"../pie/style_one\":1172,d3:169}],1065:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../plots/attributes\"),a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../../components/colorscale/attributes\"),s=(t(\"../../constants/docs\").FORMAT_LINK,t(\"../../lib/extend\").extendFlat);e.exports=s({z:{valType:\"data_array\",editType:\"calc\"},x:s({},n.x,{impliedEdits:{xtype:\"array\"}}),x0:s({},n.x0,{impliedEdits:{xtype:\"scaled\"}}),dx:s({},n.dx,{impliedEdits:{xtype:\"scaled\"}}),y:s({},n.y,{impliedEdits:{ytype:\"array\"}}),y0:s({},n.y0,{impliedEdits:{ytype:\"scaled\"}}),dy:s({},n.dy,{impliedEdits:{ytype:\"scaled\"}}),xperiod:s({},n.xperiod,{impliedEdits:{xtype:\"scaled\"}}),yperiod:s({},n.yperiod,{impliedEdits:{ytype:\"scaled\"}}),xperiod0:s({},n.xperiod0,{impliedEdits:{xtype:\"scaled\"}}),yperiod0:s({},n.yperiod0,{impliedEdits:{ytype:\"scaled\"}}),xperiodalignment:s({},n.xperiodalignment,{impliedEdits:{xtype:\"scaled\"}}),yperiodalignment:s({},n.yperiodalignment,{impliedEdits:{ytype:\"scaled\"}}),text:{valType:\"data_array\",editType:\"calc\"},hovertext:{valType:\"data_array\",editType:\"calc\"},transpose:{valType:\"boolean\",dflt:!1,editType:\"calc\"},xtype:{valType:\"enumerated\",values:[\"array\",\"scaled\"],editType:\"calc+clearAxisTypes\"},ytype:{valType:\"enumerated\",values:[\"array\",\"scaled\"],editType:\"calc+clearAxisTypes\"},zsmooth:{valType:\"enumerated\",values:[\"fast\",\"best\",!1],dflt:!1,editType:\"calc\"},hoverongaps:{valType:\"boolean\",dflt:!0,editType:\"none\"},connectgaps:{valType:\"boolean\",editType:\"calc\"},xgap:{valType:\"number\",dflt:0,min:0,editType:\"plot\"},ygap:{valType:\"number\",dflt:0,min:0,editType:\"plot\"},zhoverformat:{valType:\"string\",dflt:\"\",editType:\"none\"},hovertemplate:a(),showlegend:s({},i.showlegend,{dflt:!1})},{transforms:void 0},o(\"\",{cLetter:\"z\",autoColorDflt:!1}))},{\"../../components/colorscale/attributes\":650,\"../../constants/docs\":748,\"../../lib/extend\":768,\"../../plots/attributes\":824,\"../../plots/template_attributes\":906,\"../scatter/attributes\":1187}],1066:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../plots/cartesian/align_period\"),s=t(\"../histogram2d/calc\"),l=t(\"../../components/colorscale/calc\"),c=t(\"./convert_column_xyz\"),u=t(\"./clean_2d_array\"),f=t(\"./interp2d\"),h=t(\"./find_empties\"),p=t(\"./make_bound_array\"),d=t(\"../../constants/numerical\").BADNUM;function g(t){for(var e=[],r=t.length,n=0;nD){z(\"x scale is not linear\");break}}if(x.length&&\"fast\"===I){var R=(x[x.length-1]-x[0])/(x.length-1),F=Math.abs(R/100);for(k=0;kF){z(\"y scale is not linear\");break}}}var B=i.maxRowLength(T),N=\"scaled\"===e.xtype?\"\":r,j=p(e,N,m,v,B,A),U=\"scaled\"===e.ytype?\"\":x,V=p(e,U,b,_,T.length,S);L||(e._extremes[A._id]=a.findExtremes(A,j),e._extremes[S._id]=a.findExtremes(S,V));var q={x:j,y:V,z:T,text:e._text||e.text,hovertext:e._hovertext||e.hovertext};if(e.xperiodalignment&&y&&(q.orig_x=y),e.yperiodalignment&&w&&(q.orig_y=w),N&&N.length===j.length-1&&(q.xCenter=N),U&&U.length===V.length-1&&(q.yCenter=U),C&&(q.xRanges=M.xRanges,q.yRanges=M.yRanges,q.pts=M.pts),E||l(t,e,{vals:T,cLetter:\"z\"}),E&&e.contours&&\"heatmap\"===e.contours.coloring){var H={type:\"contour\"===e.type?\"heatmap\":\"histogram2d\",xcalendar:e.xcalendar,ycalendar:e.ycalendar};q.xfill=p(H,N,m,v,B,A),q.yfill=p(H,U,b,_,T.length,S)}return[q]}},{\"../../components/colorscale/calc\":651,\"../../constants/numerical\":753,\"../../lib\":778,\"../../plots/cartesian/align_period\":825,\"../../plots/cartesian/axes\":828,\"../../registry\":911,\"../histogram2d/calc\":1098,\"./clean_2d_array\":1067,\"./convert_column_xyz\":1069,\"./find_empties\":1071,\"./interp2d\":1074,\"./make_bound_array\":1075}],1067:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\"),a=t(\"../../constants/numerical\").BADNUM;e.exports=function(t,e,r,o){var s,l,c,u,f,h;function p(t){if(n(t))return+t}if(e&&e.transpose){for(s=0,f=0;f=0;o--)(s=((f[[(r=(a=h[o])[0])-1,i=a[1]]]||g)[2]+(f[[r+1,i]]||g)[2]+(f[[r,i-1]]||g)[2]+(f[[r,i+1]]||g)[2])/20)&&(l[a]=[r,i,s],h.splice(o,1),c=!0);if(!c)throw\"findEmpties iterated with no new neighbors\";for(a in l)f[a]=l[a],u.push(l[a])}return u.sort((function(t,e){return e[2]-t[2]}))}},{\"../../lib\":778}],1072:[function(t,e,r){\"use strict\";var n=t(\"../../components/fx\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../components/colorscale\").extractOpts;e.exports=function(t,e,r,s,l,c){var u,f,h,p,d=t.cd[0],g=d.trace,m=t.xa,v=t.ya,y=d.x,x=d.y,b=d.z,_=d.xCenter,w=d.yCenter,T=d.zmask,k=g.zhoverformat,M=y,A=x;if(!1!==t.index){try{h=Math.round(t.index[1]),p=Math.round(t.index[0])}catch(e){return void i.error(\"Error hovering on heatmap, pointNumber must be [row,col], found:\",t.index)}if(h<0||h>=b[0].length||p<0||p>b.length)return}else{if(n.inbox(e-y[0],e-y[y.length-1],0)>0||n.inbox(r-x[0],r-x[x.length-1],0)>0)return;if(c){var S;for(M=[2*y[0]-y[1]],S=1;Sg&&(v=Math.max(v,Math.abs(t[a][o]-d)/(m-g))))}return v}e.exports=function(t,e){var r,i=1;for(o(t,e),r=0;r.01;r++)i=o(t,e,a(i));return i>.01&&n.log(\"interp2d didn't converge quickly\",i),t}},{\"../../lib\":778}],1075:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\").isArrayOrTypedArray;e.exports=function(t,e,r,a,o,s){var l,c,u,f=[],h=n.traceIs(t,\"contour\"),p=n.traceIs(t,\"histogram\"),d=n.traceIs(t,\"gl2d\");if(i(e)&&e.length>1&&!p&&\"category\"!==s.type){var g=e.length;if(!(g<=o))return h?e.slice(0,o):e.slice(0,o+1);if(h||d)f=e.slice(0,o);else if(1===o)f=[e[0]-.5,e[0]+.5];else{for(f=[1.5*e[0]-.5*e[1]],u=1;u0;)h=p.c2p(T[y]),y--;for(h0;)v=d.c2p(k[y]),y--;if(v0&&(a=!0);for(var l=0;la){var o=a-r[t];return r[t]=a,o}}return 0},max:function(t,e,r,i){var a=i[e];if(n(a)){if(a=Number(a),!n(r[t]))return r[t]=a,a;if(r[t]c?t>o?t>1.1*i?i:t>1.1*a?a:o:t>s?s:t>l?l:c:Math.pow(10,Math.floor(Math.log(t)/Math.LN10))}function p(t,e,r,n,a,s){if(n&&t>o){var l=d(e,a,s),c=d(r,a,s),u=t===i?0:1;return l[u]!==c[u]}return Math.floor(r/t)-Math.floor(e/t)>.1}function d(t,e,r){var n=e.c2d(t,i,r).split(\"-\");return\"\"===n[0]&&(n.unshift(),n[0]=\"-\"+n[0]),n}e.exports=function(t,e,r,n,a){var s,l,c=-1.1*e,h=-.1*e,p=t-h,d=r[0],g=r[1],m=Math.min(f(d+h,d+p,n,a),f(g+h,g+p,n,a)),v=Math.min(f(d+c,d+h,n,a),f(g+c,g+h,n,a));if(m>v&&vo){var y=s===i?1:6,x=s===i?\"M12\":\"M1\";return function(e,r){var o=n.c2d(e,i,a),s=o.indexOf(\"-\",y);s>0&&(o=o.substr(0,s));var c=n.d2c(o,0,a);if(cr.r2l(B)&&(j=o.tickIncrement(j,b.size,!0,p)),O.start=r.l2r(j),F||i.nestedProperty(e,v+\".start\").set(O.start)}var U=b.end,V=r.r2l(z.end),q=void 0!==V;if((b.endFound||q)&&V!==r.r2l(U)){var H=q?V:i.aggNums(Math.max,null,d);O.end=r.l2r(H),q||i.nestedProperty(e,v+\".start\").set(O.end)}var G=\"autobin\"+s;return!1===e._input[G]&&(e._input[v]=i.extendFlat({},e[v]||{}),delete e._input[G],delete e[G]),[O,d]}e.exports={calc:function(t,e){var r,a,p,d,g=[],m=[],v=o.getFromId(t,\"h\"===e.orientation?e.yaxis:e.xaxis),y=\"h\"===e.orientation?\"y\":\"x\",x={x:\"y\",y:\"x\"}[y],b=e[y+\"calendar\"],_=e.cumulative,w=h(t,e,v,y),T=w[0],k=w[1],M=\"string\"==typeof T.size,A=[],S=M?A:T,E=[],C=[],L=[],I=0,P=e.histnorm,z=e.histfunc,O=-1!==P.indexOf(\"density\");_.enabled&&O&&(P=P.replace(/ ?density$/,\"\"),O=!1);var D,R=\"max\"===z||\"min\"===z?null:0,F=l.count,B=c[P],N=!1,j=function(t){return v.r2c(t,0,b)};for(i.isArrayOrTypedArray(e[x])&&\"count\"!==z&&(D=e[x],N=\"avg\"===z,F=l[z]),r=j(T.start),p=j(T.end)+(r-o.tickIncrement(r,T.size,!1,b))/1e6;r=0&&d=0;n--)s(n);else if(\"increasing\"===e){for(n=1;n=0;n--)t[n]+=t[n+1];\"exclude\"===r&&(t.push(0),t.shift())}}(m,_.direction,_.currentbin);var J=Math.min(g.length,m.length),K=[],Q=0,$=J-1;for(r=0;r=Q;r--)if(m[r]){$=r;break}for(r=Q;r<=$;r++)if(n(g[r])&&n(m[r])){var tt={p:g[r],s:m[r],b:0};_.enabled||(tt.pts=L[r],G?tt.ph0=tt.ph1=L[r].length?k[L[r][0]]:g[r]:(e._computePh=!0,tt.ph0=q(A[r]),tt.ph1=q(A[r+1],!0))),K.push(tt)}return 1===K.length&&(K[0].width1=o.tickIncrement(K[0].p,T.size,!1,b)-K[0].p),s(K,e),i.isArrayOrTypedArray(e.selectedpoints)&&i.tagSelected(K,e,X),K},calcAllAutoBins:h}},{\"../../lib\":778,\"../../plots/cartesian/axes\":828,\"../../registry\":911,\"../bar/arrays_to_calcdata\":920,\"./average\":1085,\"./bin_functions\":1087,\"./bin_label_vals\":1088,\"./norm_functions\":1096,\"fast-isnumeric\":241}],1090:[function(t,e,r){\"use strict\";e.exports={eventDataKeys:[\"binNumber\"]}},{}],1091:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/axis_ids\"),a=t(\"../../registry\").traceIs,o=t(\"../bar/defaults\").handleGroupingDefaults,s=n.nestedProperty,l=t(\"../../plots/cartesian/constraints\").getAxisGroup,c=[{aStr:{x:\"xbins.start\",y:\"ybins.start\"},name:\"start\"},{aStr:{x:\"xbins.end\",y:\"ybins.end\"},name:\"end\"},{aStr:{x:\"xbins.size\",y:\"ybins.size\"},name:\"size\"},{aStr:{x:\"nbinsx\",y:\"nbinsy\"},name:\"nbins\"}],u=[\"x\",\"y\"];e.exports=function(t,e){var r,f,h,p,d,g,m,v=e._histogramBinOpts={},y=[],x={},b=[];function _(t,e){return n.coerce(r._input,r,r._module.attributes,t,e)}function w(t){return\"v\"===t.orientation?\"x\":\"y\"}function T(t,r,a){var o=t.uid+\"__\"+a;r||(r=o);var s=function(t,r){return i.getFromTrace({_fullLayout:e},t,r).type}(t,a),l=t[a+\"calendar\"]||\"\",c=v[r],u=!0;c&&(s===c.axType&&l===c.calendar?(u=!1,c.traces.push(t),c.dirs.push(a)):(r=o,s!==c.axType&&n.warn([\"Attempted to group the bins of trace\",t.index,\"set on a\",\"type:\"+s,\"axis\",\"with bins on\",\"type:\"+c.axType,\"axis.\"].join(\" \")),l!==c.calendar&&n.warn([\"Attempted to group the bins of trace\",t.index,\"set with a\",l,\"calendar\",\"with bins\",c.calendar?\"on a \"+c.calendar+\" calendar\":\"w/o a set calendar\"].join(\" \")))),u&&(v[r]={traces:[t],dirs:[a],axType:s,calendar:t[a+\"calendar\"]||\"\"}),t[\"_\"+a+\"bingroup\"]=r}for(d=0;dS&&T.splice(S,T.length-S),A.length>S&&A.splice(S,A.length-S);var E=[],C=[],L=[],I=\"string\"==typeof w.size,P=\"string\"==typeof M.size,z=[],O=[],D=I?z:w,R=P?O:M,F=0,B=[],N=[],j=e.histnorm,U=e.histfunc,V=-1!==j.indexOf(\"density\"),q=\"max\"===U||\"min\"===U?null:0,H=a.count,G=o[j],Y=!1,W=[],X=[],Z=\"z\"in e?e.z:\"marker\"in e&&Array.isArray(e.marker.color)?e.marker.color:\"\";Z&&\"count\"!==U&&(Y=\"avg\"===U,H=a[U]);var J=w.size,K=x(w.start),Q=x(w.end)+(K-i.tickIncrement(K,J,!1,v))/1e6;for(r=K;r=0&&p=0&&d0||n.inbox(r-o.y0,r-(o.y0+o.h*s.dy),0)>0)){var u,f=Math.floor((e-o.x0)/s.dx),h=Math.floor(Math.abs(r-o.y0)/s.dy);if(s._hasZ?u=o.z[h][f]:s._hasSource&&(u=s._canvas.el.getContext(\"2d\").getImageData(f,h,1,1).data),u){var p,d=o.hi||s.hoverinfo;if(d){var g=d.split(\"+\");-1!==g.indexOf(\"all\")&&(g=[\"color\"]),-1!==g.indexOf(\"color\")&&(p=!0)}var m,v=a.colormodel[s.colormodel],y=v.colormodel||s.colormodel,x=y.length,b=s._scaler(u),_=v.suffix,w=[];(s.hovertemplate||p)&&(w.push(\"[\"+[b[0]+_[0],b[1]+_[1],b[2]+_[2]].join(\", \")),4===x&&w.push(\", \"+b[3]+_[3]),w.push(\"]\"),w=w.join(\"\"),t.extraText=y.toUpperCase()+\": \"+w),Array.isArray(s.hovertext)&&Array.isArray(s.hovertext[h])?m=s.hovertext[h][f]:Array.isArray(s.text)&&Array.isArray(s.text[h])&&(m=s.text[h][f]);var T=c.c2p(o.y0+(h+.5)*s.dy),k=o.x0+(f+.5)*s.dx,M=o.y0+(h+.5)*s.dy,A=\"[\"+u.slice(0,s.colormodel.length).join(\", \")+\"]\";return[i.extendFlat(t,{index:[h,f],x0:l.c2p(o.x0+f*s.dx),x1:l.c2p(o.x0+(f+1)*s.dx),y0:T,y1:T,color:b,xVal:k,xLabelVal:k,yVal:M,yLabelVal:M,zLabelVal:A,text:m,hovertemplateLabels:{zLabel:A,colorLabel:w,\"color[0]Label\":b[0]+_[0],\"color[1]Label\":b[1]+_[1],\"color[2]Label\":b[2]+_[2],\"color[3]Label\":b[3]+_[3]}})]}}}},{\"../../components/fx\":683,\"../../lib\":778,\"./constants\":1108}],1113:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"./style\"),hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),moduleType:\"trace\",name:\"image\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"2dMap\",\"noSortingByValue\"],animatable:!1,meta:{}}},{\"../../plots/cartesian\":841,\"./attributes\":1106,\"./calc\":1107,\"./defaults\":1109,\"./event_data\":1110,\"./hover\":1112,\"./plot\":1114,\"./style\":1115}],1114:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../lib\"),a=i.strTranslate,o=t(\"../../constants/xmlns_namespaces\"),s=t(\"./constants\"),l=i.isIOS()||i.isSafari()||i.isIE();e.exports=function(t,e,r,c){var u=e.xaxis,f=e.yaxis,h=!(l||t._context._exportedPlot);i.makeTraceGroups(c,r,\"im\").each((function(e){var r=n.select(this),l=e[0],c=l.trace,p=h&&!c._hasZ&&c._hasSource&&\"linear\"===u.type&&\"linear\"===f.type;c._fastImage=p;var d,g,m,v,y,x,b=l.z,_=l.x0,w=l.y0,T=l.w,k=l.h,M=c.dx,A=c.dy;for(x=0;void 0===d&&x0;)g=u.c2p(_+x*M),x--;for(x=0;void 0===v&&x0;)y=f.c2p(w+x*A),x--;if(gP[0];if(z||O){var D=d+S/2,R=v+E/2;L+=\"transform:\"+a(D+\"px\",R+\"px\")+\"scale(\"+(z?-1:1)+\",\"+(O?-1:1)+\")\"+a(-D+\"px\",-R+\"px\")+\";\"}}C.attr(\"style\",L);var F=new Promise((function(t){if(c._hasZ)t();else if(c._hasSource)if(c._canvas&&c._canvas.el.width===T&&c._canvas.el.height===k&&c._canvas.source===c.source)t();else{var e=document.createElement(\"canvas\");e.width=T,e.height=k;var r=e.getContext(\"2d\");c._image=c._image||new Image;var n=c._image;n.onload=function(){r.drawImage(n,0,0),c._canvas={el:e,source:c.source},t()},n.setAttribute(\"src\",c.source)}})).then((function(){var t;if(c._hasZ)t=B((function(t,e){return b[e][t]})).toDataURL(\"image/png\");else if(c._hasSource)if(p)t=c.source;else{var e=c._canvas.el.getContext(\"2d\").getImageData(0,0,T,k).data;t=B((function(t,r){var n=4*(r*T+t);return[e[n],e[n+1],e[n+2],e[n+3]]})).toDataURL(\"image/png\")}C.attr({\"xlink:href\":t,height:E,width:S,x:d,y:v})}));t._promises.push(F)}function B(t){var e=document.createElement(\"canvas\");e.width=S,e.height=E;var r,n=e.getContext(\"2d\"),a=function(t){return i.constrain(Math.round(u.c2p(_+t*M)-d),0,S)},o=function(t){return i.constrain(Math.round(f.c2p(w+t*A)-v),0,E)},h=s.colormodel[c.colormodel],p=h.colormodel||c.colormodel,g=h.fmt;for(x=0;x0}function _(t){t.each((function(t){m.stroke(n.select(this),t.line.color)})).each((function(t){m.fill(n.select(this),t.color)})).style(\"stroke-width\",(function(t){return t.line.width}))}function w(t,e,r){var n=t._fullLayout,a=i.extendFlat({type:\"linear\",ticks:\"outside\",range:r,showline:!0},e),o={type:\"linear\",_id:\"x\"+e._id},s={letter:\"x\",font:n.font,noHover:!0,noTickson:!0};function l(t,e){return i.coerce(a,o,g,t,e)}return p(a,o,l,s,n),d(a,o,l,s),o}function T(t,e,r){return[Math.min(e/t.width,r/t.height),t,e+\"x\"+r]}function k(t,e,r,i){var a=document.createElementNS(\"http://www.w3.org/2000/svg\",\"text\"),o=n.select(a);return o.text(t).attr(\"x\",0).attr(\"y\",0).attr(\"text-anchor\",r).attr(\"data-unformatted\",t).call(f.convertToTspans,i).call(c.font,e),c.bBox(o.node())}function M(t,e,r,n,a,o){var s=\"_cache\"+e;t[s]&&t[s].key===a||(t[s]={key:a,value:r});var l=i.aggNums(o,null,[t[s].value,n],2);return t[s].value=l,l}e.exports=function(t,e,r,p){var d,g=t._fullLayout;b(r)&&p&&(d=p()),i.makeTraceGroups(g._indicatorlayer,e,\"trace\").each((function(e){var p,A,S,E,C,L=e[0].trace,I=n.select(this),P=L._hasGauge,z=L._isAngular,O=L._isBullet,D=L.domain,R={w:g._size.w*(D.x[1]-D.x[0]),h:g._size.h*(D.y[1]-D.y[0]),l:g._size.l+g._size.w*D.x[0],r:g._size.r+g._size.w*(1-D.x[1]),t:g._size.t+g._size.h*(1-D.y[1]),b:g._size.b+g._size.h*D.y[0]},F=R.l+R.w/2,B=R.t+R.h/2,N=Math.min(R.w/2,R.h),j=u.innerRadius*N,U=L.align||\"center\";if(A=B,P){if(z&&(p=F,A=B+N/2,S=function(t){return function(t,e){var r=Math.sqrt(t.width/2*(t.width/2)+t.height*t.height);return[e/r,t,e]}(t,.9*j)}),O){var V=u.bulletPadding,q=1-u.bulletNumberDomainSize+V;p=R.l+(q+(1-q)*y[U])*R.w,S=function(t){return T(t,(u.bulletNumberDomainSize-V)*R.w,R.h)}}}else p=R.l+y[U]*R.w,S=function(t){return T(t,R.w,R.h)};!function(t,e,r,s){var l,u,p,d=r[0].trace,g=s.numbersX,_=s.numbersY,T=d.align||\"center\",A=v[T],S=s.transitionOpts,E=s.onComplete,C=i.ensureSingle(e,\"g\",\"numbers\"),L=[];d._hasNumber&&L.push(\"number\");d._hasDelta&&(L.push(\"delta\"),\"left\"===d.delta.position&&L.reverse());var I=C.selectAll(\"text\").data(L);function P(e,r,n,i){if(!e.match(\"s\")||n>=0==i>=0||r(n).slice(-1).match(x)||r(i).slice(-1).match(x))return r;var a=e.slice().replace(\"s\",\"f\").replace(/\\d+/,(function(t){return parseInt(t)-1})),o=w(t,{tickformat:a});return function(t){return Math.abs(t)<1?h.tickText(o,t).text:r(t)}}I.enter().append(\"text\"),I.attr(\"text-anchor\",(function(){return A})).attr(\"class\",(function(t){return t})).attr(\"x\",null).attr(\"y\",null).attr(\"dx\",null).attr(\"dy\",null),I.exit().remove();var z,O=d.mode+d.align;d._hasDelta&&(z=function(){var e=w(t,{tickformat:d.delta.valueformat},d._range);e.setScale(),h.prepTicks(e);var i=function(t){return h.tickText(e,t).text},a=function(t){return d.delta.relative?t.relativeDelta:t.delta},o=function(t,e){return 0===t||\"number\"!=typeof t||isNaN(t)?\"-\":(t>0?d.delta.increasing.symbol:d.delta.decreasing.symbol)+e(t)},s=function(t){return t.delta>=0?d.delta.increasing.color:d.delta.decreasing.color};void 0===d._deltaLastValue&&(d._deltaLastValue=a(r[0]));var l=C.select(\"text.delta\");function p(){l.text(o(a(r[0]),i)).call(m.fill,s(r[0])).call(f.convertToTspans,t)}return l.call(c.font,d.delta.font).call(m.fill,s({delta:d._deltaLastValue})),b(S)?l.transition().duration(S.duration).ease(S.easing).tween(\"text\",(function(){var t=n.select(this),e=a(r[0]),l=d._deltaLastValue,c=P(d.delta.valueformat,i,l,e),u=n.interpolateNumber(l,e);return d._deltaLastValue=e,function(e){t.text(o(u(e),c)),t.call(m.fill,s({delta:u(e)}))}})).each(\"end\",(function(){p(),E&&E()})).each(\"interrupt\",(function(){p(),E&&E()})):p(),u=k(o(a(r[0]),i),d.delta.font,A,t),l}(),O+=d.delta.position+d.delta.font.size+d.delta.font.family+d.delta.valueformat,O+=d.delta.increasing.symbol+d.delta.decreasing.symbol,p=u);d._hasNumber&&(!function(){var e=w(t,{tickformat:d.number.valueformat},d._range);e.setScale(),h.prepTicks(e);var i=function(t){return h.tickText(e,t).text},a=d.number.suffix,o=d.number.prefix,s=C.select(\"text.number\");function u(){var e=\"number\"==typeof r[0].y?o+i(r[0].y)+a:\"-\";s.text(e).call(c.font,d.number.font).call(f.convertToTspans,t)}b(S)?s.transition().duration(S.duration).ease(S.easing).each(\"end\",(function(){u(),E&&E()})).each(\"interrupt\",(function(){u(),E&&E()})).attrTween(\"text\",(function(){var t=n.select(this),e=n.interpolateNumber(r[0].lastY,r[0].y);d._lastValue=r[0].y;var s=P(d.number.valueformat,i,r[0].lastY,r[0].y);return function(r){t.text(o+s(e(r))+a)}})):u(),l=k(o+i(r[0].y)+a,d.number.font,A,t)}(),O+=d.number.font.size+d.number.font.family+d.number.valueformat+d.number.suffix+d.number.prefix,p=l);if(d._hasDelta&&d._hasNumber){var D,R,F=[(l.left+l.right)/2,(l.top+l.bottom)/2],B=[(u.left+u.right)/2,(u.top+u.bottom)/2],N=.75*d.delta.font.size;\"left\"===d.delta.position&&(D=M(d,\"deltaPos\",0,-1*(l.width*y[d.align]+u.width*(1-y[d.align])+N),O,Math.min),R=F[1]-B[1],p={width:l.width+u.width+N,height:Math.max(l.height,u.height),left:u.left+D,right:l.right,top:Math.min(l.top,u.top+R),bottom:Math.max(l.bottom,u.bottom+R)}),\"right\"===d.delta.position&&(D=M(d,\"deltaPos\",0,l.width*(1-y[d.align])+u.width*y[d.align]+N,O,Math.max),R=F[1]-B[1],p={width:l.width+u.width+N,height:Math.max(l.height,u.height),left:l.left,right:u.right+D,top:Math.min(l.top,u.top+R),bottom:Math.max(l.bottom,u.bottom+R)}),\"bottom\"===d.delta.position&&(D=null,R=u.height,p={width:Math.max(l.width,u.width),height:l.height+u.height,left:Math.min(l.left,u.left),right:Math.max(l.right,u.right),top:l.bottom-l.height,bottom:l.bottom+u.height}),\"top\"===d.delta.position&&(D=null,R=l.top,p={width:Math.max(l.width,u.width),height:l.height+u.height,left:Math.min(l.left,u.left),right:Math.max(l.right,u.right),top:l.bottom-l.height-u.height,bottom:l.bottom}),z.attr({dx:D,dy:R})}(d._hasNumber||d._hasDelta)&&C.attr(\"transform\",(function(){var t=s.numbersScaler(p);O+=t[2];var e,r=M(d,\"numbersScale\",1,t[0],O,Math.min);d._scaleNumbers||(r=1),e=d._isAngular?_-r*p.bottom:_-r*(p.top+p.bottom)/2,d._numbersTop=r*p.top+e;var n=p[T];\"center\"===T&&(n=(p.left+p.right)/2);var i=g-r*n;return i=M(d,\"numbersTranslate\",0,i,O,Math.max),o(i,e)+a(r)}))}(t,I,e,{numbersX:p,numbersY:A,numbersScaler:S,transitionOpts:r,onComplete:d}),P&&(E={range:L.gauge.axis.range,color:L.gauge.bgcolor,line:{color:L.gauge.bordercolor,width:0},thickness:1},C={range:L.gauge.axis.range,color:\"rgba(0, 0, 0, 0)\",line:{color:L.gauge.bordercolor,width:L.gauge.borderwidth},thickness:1});var H=I.selectAll(\"g.angular\").data(z?e:[]);H.exit().remove();var G=I.selectAll(\"g.angularaxis\").data(z?e:[]);G.exit().remove(),z&&function(t,e,r,i){var a,c,u,f,p=r[0].trace,d=i.size,g=i.radius,m=i.innerRadius,v=i.gaugeBg,y=i.gaugeOutline,x=[d.l+d.w/2,d.t+d.h/2+g/2],T=i.gauge,k=i.layer,M=i.transitionOpts,A=i.onComplete,S=Math.PI/2;function E(t){var e=p.gauge.axis.range[0],r=(t-e)/(p.gauge.axis.range[1]-e)*Math.PI-S;return r<-S?-S:r>S?S:r}function C(t){return n.svg.arc().innerRadius((m+g)/2-t/2*(g-m)).outerRadius((m+g)/2+t/2*(g-m)).startAngle(-S)}function L(t){t.attr(\"d\",(function(t){return C(t.thickness).startAngle(E(t.range[0])).endAngle(E(t.range[1]))()}))}T.enter().append(\"g\").classed(\"angular\",!0),T.attr(\"transform\",o(x[0],x[1])),k.enter().append(\"g\").classed(\"angularaxis\",!0).classed(\"crisp\",!0),k.selectAll(\"g.xangularaxistick,path,text\").remove(),(a=w(t,p.gauge.axis)).type=\"linear\",a.range=p.gauge.axis.range,a._id=\"xangularaxis\",a.setScale();var I=function(t){return(a.range[0]-t.x)/(a.range[1]-a.range[0])*Math.PI+Math.PI},P={},z=h.makeLabelFns(a,0).labelStandoff;P.xFn=function(t){var e=I(t);return Math.cos(e)*z},P.yFn=function(t){var e=I(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(z+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*l)},P.anchorFn=function(t){var e=I(t),r=Math.cos(e);return Math.abs(r)<.1?\"middle\":r>0?\"start\":\"end\"},P.heightFn=function(t,e,r){var n=I(t);return-.5*(1+Math.sin(n))*r};var O=function(t){return o(x[0]+g*Math.cos(t),x[1]-g*Math.sin(t))};u=function(t){return O(I(t))};if(c=h.calcTicks(a),f=h.getTickSigns(a)[2],a.visible){f=\"inside\"===a.ticks?-1:1;var D=(a.linewidth||1)/2;h.drawTicks(t,a,{vals:c,layer:k,path:\"M\"+f*D+\",0h\"+f*a.ticklen,transFn:function(t){var e=I(t);return O(e)+\"rotate(\"+-s(e)+\")\"}}),h.drawLabels(t,a,{vals:c,layer:k,transFn:u,labelFns:P})}var R=[v].concat(p.gauge.steps),F=T.selectAll(\"g.bg-arc\").data(R);F.enter().append(\"g\").classed(\"bg-arc\",!0).append(\"path\"),F.select(\"path\").call(L).call(_),F.exit().remove();var B=C(p.gauge.bar.thickness),N=T.selectAll(\"g.value-arc\").data([p.gauge.bar]);N.enter().append(\"g\").classed(\"value-arc\",!0).append(\"path\");var j=N.select(\"path\");b(M)?(j.transition().duration(M.duration).ease(M.easing).each(\"end\",(function(){A&&A()})).each(\"interrupt\",(function(){A&&A()})).attrTween(\"d\",(U=B,V=E(r[0].lastY),q=E(r[0].y),function(){var t=n.interpolate(V,q);return function(e){return U.endAngle(t(e))()}})),p._lastValue=r[0].y):j.attr(\"d\",\"number\"==typeof r[0].y?B.endAngle(E(r[0].y)):\"M0,0Z\");var U,V,q;j.call(_),N.exit().remove(),R=[];var H=p.gauge.threshold.value;H&&R.push({range:[H,H],color:p.gauge.threshold.color,line:{color:p.gauge.threshold.line.color,width:p.gauge.threshold.line.width},thickness:p.gauge.threshold.thickness});var G=T.selectAll(\"g.threshold-arc\").data(R);G.enter().append(\"g\").classed(\"threshold-arc\",!0).append(\"path\"),G.select(\"path\").call(L).call(_),G.exit().remove();var Y=T.selectAll(\"g.gauge-outline\").data([y]);Y.enter().append(\"g\").classed(\"gauge-outline\",!0).append(\"path\"),Y.select(\"path\").call(L).call(_),Y.exit().remove()}(t,0,e,{radius:N,innerRadius:j,gauge:H,layer:G,size:R,gaugeBg:E,gaugeOutline:C,transitionOpts:r,onComplete:d});var Y=I.selectAll(\"g.bullet\").data(O?e:[]);Y.exit().remove();var W=I.selectAll(\"g.bulletaxis\").data(O?e:[]);W.exit().remove(),O&&function(t,e,r,n){var i,a,s,l,c,f=r[0].trace,p=n.gauge,d=n.layer,g=n.gaugeBg,v=n.gaugeOutline,y=n.size,x=f.domain,T=n.transitionOpts,k=n.onComplete;p.enter().append(\"g\").classed(\"bullet\",!0),p.attr(\"transform\",o(y.l,y.t)),d.enter().append(\"g\").classed(\"bulletaxis\",!0).classed(\"crisp\",!0),d.selectAll(\"g.xbulletaxistick,path,text\").remove();var M=y.h,A=f.gauge.bar.thickness*M,S=x.x[0],E=x.x[0]+(x.x[1]-x.x[0])*(f._hasNumber||f._hasDelta?1-u.bulletNumberDomainSize:1);(i=w(t,f.gauge.axis))._id=\"xbulletaxis\",i.domain=[S,E],i.setScale(),a=h.calcTicks(i),s=h.makeTransTickFn(i),l=h.getTickSigns(i)[2],c=y.t+y.h,i.visible&&(h.drawTicks(t,i,{vals:\"inside\"===i.ticks?h.clipEnds(i,a):a,layer:d,path:h.makeTickPath(i,c,l),transFn:s}),h.drawLabels(t,i,{vals:a,layer:d,transFn:s,labelFns:h.makeLabelFns(i,c)}));function C(t){t.attr(\"width\",(function(t){return Math.max(0,i.c2p(t.range[1])-i.c2p(t.range[0]))})).attr(\"x\",(function(t){return i.c2p(t.range[0])})).attr(\"y\",(function(t){return.5*(1-t.thickness)*M})).attr(\"height\",(function(t){return t.thickness*M}))}var L=[g].concat(f.gauge.steps),I=p.selectAll(\"g.bg-bullet\").data(L);I.enter().append(\"g\").classed(\"bg-bullet\",!0).append(\"rect\"),I.select(\"rect\").call(C).call(_),I.exit().remove();var P=p.selectAll(\"g.value-bullet\").data([f.gauge.bar]);P.enter().append(\"g\").classed(\"value-bullet\",!0).append(\"rect\"),P.select(\"rect\").attr(\"height\",A).attr(\"y\",(M-A)/2).call(_),b(T)?P.select(\"rect\").transition().duration(T.duration).ease(T.easing).each(\"end\",(function(){k&&k()})).each(\"interrupt\",(function(){k&&k()})).attr(\"width\",Math.max(0,i.c2p(Math.min(f.gauge.axis.range[1],r[0].y)))):P.select(\"rect\").attr(\"width\",\"number\"==typeof r[0].y?Math.max(0,i.c2p(Math.min(f.gauge.axis.range[1],r[0].y))):0);P.exit().remove();var z=r.filter((function(){return f.gauge.threshold.value})),O=p.selectAll(\"g.threshold-bullet\").data(z);O.enter().append(\"g\").classed(\"threshold-bullet\",!0).append(\"line\"),O.select(\"line\").attr(\"x1\",i.c2p(f.gauge.threshold.value)).attr(\"x2\",i.c2p(f.gauge.threshold.value)).attr(\"y1\",(1-f.gauge.threshold.thickness)/2*M).attr(\"y2\",(1-(1-f.gauge.threshold.thickness)/2)*M).call(m.stroke,f.gauge.threshold.line.color).style(\"stroke-width\",f.gauge.threshold.line.width),O.exit().remove();var D=p.selectAll(\"g.gauge-outline\").data([v]);D.enter().append(\"g\").classed(\"gauge-outline\",!0).append(\"rect\"),D.select(\"rect\").call(C).call(_),D.exit().remove()}(t,0,e,{gauge:Y,layer:W,size:R,gaugeBg:E,gaugeOutline:C,transitionOpts:r,onComplete:d});var X=I.selectAll(\"text.title\").data(e);X.exit().remove(),X.enter().append(\"text\").classed(\"title\",!0),X.attr(\"text-anchor\",(function(){return O?v.right:v[L.title.align]})).text(L.title.text).call(c.font,L.title.font).call(f.convertToTspans,t),X.attr(\"transform\",(function(){var t,e=R.l+R.w*y[L.title.align],r=u.titlePadding,n=c.bBox(X.node());if(P){if(z)if(L.gauge.axis.visible)t=c.bBox(G.node()).top-r-n.bottom;else t=R.t+R.h/2-N/2-n.bottom-r;O&&(t=A-(n.top+n.bottom)/2,e=R.l-u.bulletPadding*R.w)}else t=L._numbersTop-r-n.bottom;return o(e,t)}))}))}},{\"../../components/color\":643,\"../../components/drawing\":665,\"../../constants/alignment\":745,\"../../lib\":778,\"../../lib/svg_text_utils\":803,\"../../plots/cartesian/axes\":828,\"../../plots/cartesian/axis_defaults\":830,\"../../plots/cartesian/layout_attributes\":842,\"../../plots/cartesian/position_defaults\":845,\"./constants\":1119,d3:169}],1123:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/template_attributes\").hovertemplateAttrs,a=t(\"../mesh3d/attributes\"),o=t(\"../../plots/attributes\"),s=t(\"../../lib/extend\").extendFlat,l=t(\"../../plot_api/edit_types\").overrideAll;var c=e.exports=l(s({x:{valType:\"data_array\"},y:{valType:\"data_array\"},z:{valType:\"data_array\"},value:{valType:\"data_array\"},isomin:{valType:\"number\"},isomax:{valType:\"number\"},surface:{show:{valType:\"boolean\",dflt:!0},count:{valType:\"integer\",dflt:2,min:1},fill:{valType:\"number\",min:0,max:1,dflt:1},pattern:{valType:\"flaglist\",flags:[\"A\",\"B\",\"C\",\"D\",\"E\"],extras:[\"all\",\"odd\",\"even\"],dflt:\"all\"}},spaceframe:{show:{valType:\"boolean\",dflt:!1},fill:{valType:\"number\",min:0,max:1,dflt:.15}},slices:{x:{show:{valType:\"boolean\",dflt:!1},locations:{valType:\"data_array\",dflt:[]},fill:{valType:\"number\",min:0,max:1,dflt:1}},y:{show:{valType:\"boolean\",dflt:!1},locations:{valType:\"data_array\",dflt:[]},fill:{valType:\"number\",min:0,max:1,dflt:1}},z:{show:{valType:\"boolean\",dflt:!1},locations:{valType:\"data_array\",dflt:[]},fill:{valType:\"number\",min:0,max:1,dflt:1}}},caps:{x:{show:{valType:\"boolean\",dflt:!0},fill:{valType:\"number\",min:0,max:1,dflt:1}},y:{show:{valType:\"boolean\",dflt:!0},fill:{valType:\"number\",min:0,max:1,dflt:1}},z:{show:{valType:\"boolean\",dflt:!0},fill:{valType:\"number\",min:0,max:1,dflt:1}}},text:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertemplate:i(),showlegend:s({},o.showlegend,{dflt:!1})},n(\"\",{colorAttr:\"`value`\",showScaleDflt:!0,editTypeOverride:\"calc\"}),{opacity:a.opacity,lightposition:a.lightposition,lighting:a.lighting,flatshading:a.flatshading,contour:a.contour,hoverinfo:s({},o.hoverinfo)}),\"calc\",\"nested\");c.flatshading.dflt=!0,c.lighting.facenormalsepsilon.dflt=0,c.x.editType=c.y.editType=c.z.editType=c.value.editType=\"calc+clearAxisTypes\",c.transforms=void 0},{\"../../components/colorscale/attributes\":650,\"../../lib/extend\":768,\"../../plot_api/edit_types\":810,\"../../plots/attributes\":824,\"../../plots/template_attributes\":906,\"../mesh3d/attributes\":1128}],1124:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\"),i=t(\"../streamtube/calc\").processGrid,a=t(\"../streamtube/calc\").filter;e.exports=function(t,e){e._len=Math.min(e.x.length,e.y.length,e.z.length,e.value.length),e._x=a(e.x,e._len),e._y=a(e.y,e._len),e._z=a(e.z,e._len),e._value=a(e.value,e._len);var r=i(e);e._gridFill=r.fill,e._Xs=r.Xs,e._Ys=r.Ys,e._Zs=r.Zs,e._len=r.len;for(var o=1/0,s=-1/0,l=0;l0;r--){var n=Math.min(e[r],e[r-1]),i=Math.max(e[r],e[r-1]);if(i>n&&n-1}function R(t,e){return null===t?e:t}function F(e,r,n){L();var i,a,o,l=[r],c=[n];if(s>=1)l=[r],c=[n];else if(s>0){var u=function(t,e){var r=t[0],n=t[1],i=t[2],a=function(t,e,r){for(var n=[],i=0;i-1?n[p]:C(d,g,v);h[p]=x>-1?x:P(d,g,v,R(e,y))}i=h[0],a=h[1],o=h[2],t._meshI.push(i),t._meshJ.push(a),t._meshK.push(o),++m}}function B(t,e,r,n){var i=t[3];in&&(i=n);for(var a=(t[3]-i)/(t[3]-e[3]+1e-9),o=[],s=0;s<4;s++)o[s]=(1-a)*t[s]+a*e[s];return o}function N(t,e,r){return t>=e&&t<=r}function j(t){var e=.001*(E-S);return t>=S-e&&t<=E+e}function U(e){for(var r=[],n=0;n<4;n++){var i=e[n];r.push([t._x[i],t._y[i],t._z[i],t._value[i]])}return r}function V(t,e,r,n,i,a){a||(a=1),r=[-1,-1,-1];var o=!1,s=[N(e[0][3],n,i),N(e[1][3],n,i),N(e[2][3],n,i)];if(!s[0]&&!s[1]&&!s[2])return!1;var l=function(t,e,r){return j(e[0][3])&&j(e[1][3])&&j(e[2][3])?(F(t,e,r),!0):a<3&&V(t,e,r,S,E,++a)};if(s[0]&&s[1]&&s[2])return l(t,e,r)||o;var c=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach((function(a){if(s[a[0]]&&s[a[1]]&&!s[a[2]]){var u=e[a[0]],f=e[a[1]],h=e[a[2]],p=B(h,u,n,i),d=B(h,f,n,i);o=l(t,[d,p,u],[-1,-1,r[a[0]]])||o,o=l(t,[u,f,d],[r[a[0]],r[a[1]],-1])||o,c=!0}})),c||[[0,1,2],[1,2,0],[2,0,1]].forEach((function(a){if(s[a[0]]&&!s[a[1]]&&!s[a[2]]){var u=e[a[0]],f=e[a[1]],h=e[a[2]],p=B(f,u,n,i),d=B(h,u,n,i);o=l(t,[d,p,u],[-1,-1,r[a[0]]])||o,c=!0}})),o}function q(t,e,r,n){var i=!1,a=U(e),o=[N(a[0][3],r,n),N(a[1][3],r,n),N(a[2][3],r,n),N(a[3][3],r,n)];if(!(o[0]||o[1]||o[2]||o[3]))return i;if(o[0]&&o[1]&&o[2]&&o[3])return g&&(i=function(t,e,r){var n=function(n,i,a){F(t,[e[n],e[i],e[a]],[r[n],r[i],r[a]])};n(0,1,2),n(3,0,1),n(2,3,0),n(1,2,3)}(t,a,e)||i),i;var s=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],f=a[l[2]],h=a[l[3]];if(g)i=F(t,[c,u,f],[e[l[0]],e[l[1]],e[l[2]]])||i;else{var p=B(h,c,r,n),d=B(h,u,r,n),m=B(h,f,r,n);i=F(null,[p,d,m],[-1,-1,-1])||i}s=!0}})),s?i:([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&!o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],f=a[l[2]],h=a[l[3]],p=B(f,c,r,n),d=B(f,u,r,n),m=B(h,u,r,n),v=B(h,c,r,n);g?(i=F(t,[c,v,p],[e[l[0]],-1,-1])||i,i=F(t,[u,d,m],[e[l[1]],-1,-1])||i):i=function(t,e,r){var n=function(n,i,a){F(t,[e[n],e[i],e[a]],[r[n],r[i],r[a]])};n(0,1,2),n(2,3,0)}(null,[p,d,m,v],[-1,-1,-1,-1])||i,s=!0}})),s||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach((function(l){if(o[l[0]]&&!o[l[1]]&&!o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],f=a[l[2]],h=a[l[3]],p=B(u,c,r,n),d=B(f,c,r,n),m=B(h,c,r,n);g?(i=F(t,[c,p,d],[e[l[0]],-1,-1])||i,i=F(t,[c,d,m],[e[l[0]],-1,-1])||i,i=F(t,[c,m,p],[e[l[0]],-1,-1])||i):i=F(null,[p,d,m],[-1,-1,-1])||i,s=!0}})),i)}function H(t,e,r,n,i,a,o,s,l,c,u){var f=!1;return d&&(D(t,\"A\")&&(f=q(null,[e,r,n,a],c,u)||f),D(t,\"B\")&&(f=q(null,[r,n,i,l],c,u)||f),D(t,\"C\")&&(f=q(null,[r,a,o,l],c,u)||f),D(t,\"D\")&&(f=q(null,[n,a,s,l],c,u)||f),D(t,\"E\")&&(f=q(null,[r,n,a,l],c,u)||f)),g&&(f=q(t,[r,n,a,l],c,u)||f),f}function G(t,e,r,n,i,a,o,s){return[!0===s[0]||V(t,U([e,r,n]),[e,r,n],a,o),!0===s[1]||V(t,U([n,i,e]),[n,i,e],a,o)]}function Y(t,e,r,n,i,a,o,s,l){return s?G(t,e,r,i,n,a,o,l):G(t,r,i,n,e,a,o,l)}function W(t,e,r,n,i,a,o){var s,l,c,u,f=!1,h=function(){f=V(t,[s,l,c],[-1,-1,-1],i,a)||f,f=V(t,[c,u,s],[-1,-1,-1],i,a)||f},p=o[0],d=o[1],g=o[2];return p&&(s=z(U([k(e,r-0,n-0)])[0],U([k(e-1,r-0,n-0)])[0],p),l=z(U([k(e,r-0,n-1)])[0],U([k(e-1,r-0,n-1)])[0],p),c=z(U([k(e,r-1,n-1)])[0],U([k(e-1,r-1,n-1)])[0],p),u=z(U([k(e,r-1,n-0)])[0],U([k(e-1,r-1,n-0)])[0],p),h()),d&&(s=z(U([k(e-0,r,n-0)])[0],U([k(e-0,r-1,n-0)])[0],d),l=z(U([k(e-0,r,n-1)])[0],U([k(e-0,r-1,n-1)])[0],d),c=z(U([k(e-1,r,n-1)])[0],U([k(e-1,r-1,n-1)])[0],d),u=z(U([k(e-1,r,n-0)])[0],U([k(e-1,r-1,n-0)])[0],d),h()),g&&(s=z(U([k(e-0,r-0,n)])[0],U([k(e-0,r-0,n-1)])[0],g),l=z(U([k(e-0,r-1,n)])[0],U([k(e-0,r-1,n-1)])[0],g),c=z(U([k(e-1,r-1,n)])[0],U([k(e-1,r-1,n-1)])[0],g),u=z(U([k(e-1,r-0,n)])[0],U([k(e-1,r-0,n-1)])[0],g),h()),f}function X(t,e,r,n,i,a,o,s,l,c,u,f){var h=t;return f?(d&&\"even\"===t&&(h=null),H(h,e,r,n,i,a,o,s,l,c,u)):(d&&\"odd\"===t&&(h=null),H(h,l,s,o,a,i,n,r,e,c,u))}function Z(t,e,r,n,i){for(var a=[],o=0,s=0;sMath.abs(d-A)?[M,d]:[d,A];$(e,T[0],T[1])}}var C=[[Math.min(S,A),Math.max(S,A)],[Math.min(M,E),Math.max(M,E)]];[\"x\",\"y\",\"z\"].forEach((function(e){for(var r=[],n=0;n0&&(u.push(p.id),\"x\"===e?f.push([p.distRatio,0,0]):\"y\"===e?f.push([0,p.distRatio,0]):f.push([0,0,p.distRatio]))}else c=nt(1,\"x\"===e?b-1:\"y\"===e?_-1:w-1);u.length>0&&(r[i]=\"x\"===e?tt(null,u,a,o,f,r[i]):\"y\"===e?et(null,u,a,o,f,r[i]):rt(null,u,a,o,f,r[i]),i++),c.length>0&&(r[i]=\"x\"===e?Z(null,c,a,o,r[i]):\"y\"===e?J(null,c,a,o,r[i]):K(null,c,a,o,r[i]),i++)}var d=t.caps[e];d.show&&d.fill&&(O(d.fill),r[i]=\"x\"===e?Z(null,[0,b-1],a,o,r[i]):\"y\"===e?J(null,[0,_-1],a,o,r[i]):K(null,[0,w-1],a,o,r[i]),i++)}})),0===m&&I(),t._meshX=n,t._meshY=i,t._meshZ=a,t._meshIntensity=o,t._Xs=v,t._Ys=y,t._Zs=x}(),t}e.exports={findNearestOnAxis:l,generateIsoMeshes:h,createIsosurfaceTrace:function(t,e){var r=t.glplot.gl,i=n({gl:r}),a=new c(t,i,e.uid);return i._trace=a,a.update(e),t.glplot.add(i),a}}},{\"../../components/colorscale\":655,\"../../lib/gl_format_color\":774,\"../../lib/str2rgbarray\":802,\"../../plots/gl3d/zip3\":881,\"gl-mesh3d\":309}],1126:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../registry\"),a=t(\"./attributes\"),o=t(\"../../components/colorscale/defaults\");function s(t,e,r,n,a){var s=a(\"isomin\"),l=a(\"isomax\");null!=l&&null!=s&&s>l&&(e.isomin=null,e.isomax=null);var c=a(\"x\"),u=a(\"y\"),f=a(\"z\"),h=a(\"value\");c&&c.length&&u&&u.length&&f&&f.length&&h&&h.length?(i.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\",\"z\"],n),[\"x\",\"y\",\"z\"].forEach((function(t){var e=\"caps.\"+t;a(e+\".show\")&&a(e+\".fill\");var r=\"slices.\"+t;a(r+\".show\")&&(a(r+\".fill\"),a(r+\".locations\"))})),a(\"spaceframe.show\")&&a(\"spaceframe.fill\"),a(\"surface.show\")&&(a(\"surface.count\"),a(\"surface.fill\"),a(\"surface.pattern\")),a(\"contour.show\")&&(a(\"contour.color\"),a(\"contour.width\")),[\"text\",\"hovertext\",\"hovertemplate\",\"lighting.ambient\",\"lighting.diffuse\",\"lighting.specular\",\"lighting.roughness\",\"lighting.fresnel\",\"lighting.vertexnormalsepsilon\",\"lighting.facenormalsepsilon\",\"lightposition.x\",\"lightposition.y\",\"lightposition.z\",\"flatshading\",\"opacity\"].forEach((function(t){a(t)})),o(t,e,n,a,{prefix:\"\",cLetter:\"c\"}),e._length=null):e.visible=!1}e.exports={supplyDefaults:function(t,e,r,i){s(t,e,r,i,(function(r,i){return n.coerce(t,e,a,r,i)}))},supplyIsoDefaults:s}},{\"../../components/colorscale/defaults\":653,\"../../lib\":778,\"../../registry\":911,\"./attributes\":1123}],1127:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,calc:t(\"./calc\"),colorbar:{min:\"cmin\",max:\"cmax\"},plot:t(\"./convert\").createIsosurfaceTrace,moduleType:\"trace\",name:\"isosurface\",basePlotModule:t(\"../../plots/gl3d\"),categories:[\"gl3d\",\"showLegend\"],meta:{}}},{\"../../plots/gl3d\":870,\"./attributes\":1123,\"./calc\":1124,\"./convert\":1125,\"./defaults\":1126}],1128:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/template_attributes\").hovertemplateAttrs,a=t(\"../surface/attributes\"),o=t(\"../../plots/attributes\"),s=t(\"../../lib/extend\").extendFlat;e.exports=s({x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},z:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},i:{valType:\"data_array\",editType:\"calc\"},j:{valType:\"data_array\",editType:\"calc\"},k:{valType:\"data_array\",editType:\"calc\"},text:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertemplate:i({editType:\"calc\"}),delaunayaxis:{valType:\"enumerated\",values:[\"x\",\"y\",\"z\"],dflt:\"z\",editType:\"calc\"},alphahull:{valType:\"number\",dflt:-1,editType:\"calc\"},intensity:{valType:\"data_array\",editType:\"calc\"},intensitymode:{valType:\"enumerated\",values:[\"vertex\",\"cell\"],dflt:\"vertex\",editType:\"calc\"},color:{valType:\"color\",editType:\"calc\"},vertexcolor:{valType:\"data_array\",editType:\"calc\"},facecolor:{valType:\"data_array\",editType:\"calc\"},transforms:void 0},n(\"\",{colorAttr:\"`intensity`\",showScaleDflt:!0,editTypeOverride:\"calc\"}),{opacity:a.opacity,flatshading:{valType:\"boolean\",dflt:!1,editType:\"calc\"},contour:{show:s({},a.contours.x.show,{}),color:a.contours.x.color,width:a.contours.x.width,editType:\"calc\"},lightposition:{x:s({},a.lightposition.x,{dflt:1e5}),y:s({},a.lightposition.y,{dflt:1e5}),z:s({},a.lightposition.z,{dflt:0}),editType:\"calc\"},lighting:s({vertexnormalsepsilon:{valType:\"number\",min:0,max:1,dflt:1e-12,editType:\"calc\"},facenormalsepsilon:{valType:\"number\",min:0,max:1,dflt:1e-6,editType:\"calc\"},editType:\"calc\"},a.lighting),hoverinfo:s({},o.hoverinfo,{editType:\"calc\"}),showlegend:s({},o.showlegend,{dflt:!1})})},{\"../../components/colorscale/attributes\":650,\"../../lib/extend\":768,\"../../plots/attributes\":824,\"../../plots/template_attributes\":906,\"../surface/attributes\":1311}],1129:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\");e.exports=function(t,e){e.intensity&&n(t,e,{vals:e.intensity,containerStr:\"\",cLetter:\"c\"})}},{\"../../components/colorscale/calc\":651}],1130:[function(t,e,r){\"use strict\";var n=t(\"gl-mesh3d\"),i=t(\"delaunay-triangulate\"),a=t(\"alpha-shape\"),o=t(\"convex-hull\"),s=t(\"../../lib/gl_format_color\").parseColorScale,l=t(\"../../lib/str2rgbarray\"),c=t(\"../../components/colorscale\").extractOpts,u=t(\"../../plots/gl3d/zip3\");function f(t,e,r){this.scene=t,this.uid=r,this.mesh=e,this.name=\"\",this.color=\"#fff\",this.data=null,this.showContour=!1}var h=f.prototype;function p(t){for(var e=[],r=t.length,n=0;n=e-.5)return!1;return!0}h.handlePick=function(t){if(t.object===this.mesh){var e=t.index=t.data.index;t.data._cellCenter?t.traceCoordinate=t.data.dataCoordinate:t.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]];var r=this.data.hovertext||this.data.text;return Array.isArray(r)&&void 0!==r[e]?t.textLabel=r[e]:r&&(t.textLabel=r),!0}},h.update=function(t){var e=this.scene,r=e.fullSceneLayout;this.data=t;var n,f=t.x.length,h=u(d(r.xaxis,t.x,e.dataScale[0],t.xcalendar),d(r.yaxis,t.y,e.dataScale[1],t.ycalendar),d(r.zaxis,t.z,e.dataScale[2],t.zcalendar));if(t.i&&t.j&&t.k){if(t.i.length!==t.j.length||t.j.length!==t.k.length||!m(t.i,f)||!m(t.j,f)||!m(t.k,f))return;n=u(g(t.i),g(t.j),g(t.k))}else n=0===t.alphahull?o(h):t.alphahull>0?a(t.alphahull,h):function(t,e){for(var r=[\"x\",\"y\",\"z\"].indexOf(t),n=[],a=e.length,o=0;ov):m=M>w,v=M;var A=c(w,T,k,M);A.pos=_,A.yc=(w+M)/2,A.i=b,A.dir=m?\"increasing\":\"decreasing\",A.x=A.pos,A.y=[k,T],y&&(A.orig_p=r[b]),d&&(A.tx=e.text[b]),g&&(A.htx=e.hovertext[b]),x.push(A)}else x.push({pos:_,empty:!0})}return e._extremes[l._id]=a.findExtremes(l,n.concat(h,f),{padded:!0}),x.length&&(x[0].t={labels:{open:i(t,\"open:\")+\" \",high:i(t,\"high:\")+\" \",low:i(t,\"low:\")+\" \",close:i(t,\"close:\")+\" \"}}),x}e.exports={calc:function(t,e){var r=a.getFromId(t,e.xaxis),i=a.getFromId(t,e.yaxis),s=function(t,e,r){var i=r._minDiff;if(!i){var a,s=t._fullData,l=[];for(i=1/0,a=0;a\"+c.labels[x]+n.hoverLabelText(s,b):((y=i.extendFlat({},h)).y0=y.y1=_,y.yLabelVal=b,y.yLabel=c.labels[x]+n.hoverLabelText(s,b),y.name=\"\",f.push(y),m[b]=y)}return f}function h(t,e,r,i){var a=t.cd,o=t.ya,l=a[0].trace,f=a[0].t,h=u(t,e,r,i);if(!h)return[];var p=a[h.index],d=h.index=p.i,g=p.dir;function m(t){return f.labels[t]+n.hoverLabelText(o,l[t][d])}var v=p.hi||l.hoverinfo,y=v.split(\"+\"),x=\"all\"===v,b=x||-1!==y.indexOf(\"y\"),_=x||-1!==y.indexOf(\"text\"),w=b?[m(\"open\"),m(\"high\"),m(\"low\"),m(\"close\")+\" \"+c[g]]:[];return _&&s(p,l,w),h.extraText=w.join(\"
\"),h.y0=h.y1=o.c2p(p.yc,!0),[h]}e.exports={hoverPoints:function(t,e,r,n){return t.cd[0].trace.hoverlabel.split?f(t,e,r,n):h(t,e,r,n)},hoverSplit:f,hoverOnPoints:h}},{\"../../components/color\":643,\"../../components/fx\":683,\"../../constants/delta.js\":747,\"../../lib\":778,\"../../plots/cartesian/axes\":828}],1137:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"ohlc\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"showLegend\"],meta:{},attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\").calc,plot:t(\"./plot\"),style:t(\"./style\"),hoverPoints:t(\"./hover\").hoverPoints,selectPoints:t(\"./select\")}},{\"../../plots/cartesian\":841,\"./attributes\":1133,\"./calc\":1134,\"./defaults\":1135,\"./hover\":1136,\"./plot\":1139,\"./select\":1140,\"./style\":1141}],1138:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\");e.exports=function(t,e,r,a){var o=r(\"x\"),s=r(\"open\"),l=r(\"high\"),c=r(\"low\"),u=r(\"close\");if(r(\"hoverlabel.split\"),n.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\"],a),s&&l&&c&&u){var f=Math.min(s.length,l.length,c.length,u.length);return o&&(f=Math.min(f,i.minRowLength(o))),e._length=f,f}}},{\"../../lib\":778,\"../../registry\":911}],1139:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../lib\");e.exports=function(t,e,r,a){var o=e.yaxis,s=e.xaxis,l=!!s.rangebreaks;i.makeTraceGroups(a,r,\"trace ohlc\").each((function(t){var e=n.select(this),r=t[0],a=r.t;if(!0!==r.trace.visible||a.empty)e.remove();else{var c=a.tickLen,u=e.selectAll(\"path\").data(i.identity);u.enter().append(\"path\"),u.exit().remove(),u.attr(\"d\",(function(t){if(t.empty)return\"M0,0Z\";var e=s.c2p(t.pos-c,!0),r=s.c2p(t.pos+c,!0),n=l?(e+r)/2:s.c2p(t.pos,!0);return\"M\"+e+\",\"+o.c2p(t.o,!0)+\"H\"+n+\"M\"+n+\",\"+o.c2p(t.h,!0)+\"V\"+o.c2p(t.l,!0)+\"M\"+r+\",\"+o.c2p(t.c,!0)+\"H\"+n}))}}))}},{\"../../lib\":778,d3:169}],1140:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r,n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].t.bPos||0;if(!1===e)for(r=0;r=t.length)return!1;if(void 0!==e[t[r]])return!1;e[t[r]]=!0}return!0}(t.map((function(t){return t.displayindex}))))for(e=0;e0;c&&(o=\"array\");var u=r(\"categoryorder\",o);\"array\"===u?(r(\"categoryarray\"),r(\"ticktext\")):(delete t.categoryarray,delete t.ticktext),c||\"array\"!==u||(e.categoryorder=\"trace\")}}e.exports=function(t,e,r,f){function h(r,i){return n.coerce(t,e,l,r,i)}var p=s(t,e,{name:\"dimensions\",handleItemDefaults:u}),d=function(t,e,r,o,s){s(\"line.shape\"),s(\"line.hovertemplate\");var l=s(\"line.color\",o.colorway[0]);if(i(t,\"line\")&&n.isArrayOrTypedArray(l)){if(l.length)return s(\"line.colorscale\"),a(t,e,o,s,{prefix:\"line.\",cLetter:\"c\"}),l.length;e.line.color=r}return 1/0}(t,e,r,f,h);o(e,f,h),Array.isArray(p)&&p.length||(e.visible=!1),c(e,p,\"values\",d),h(\"hoveron\"),h(\"hovertemplate\"),h(\"arrangement\"),h(\"bundlecolors\"),h(\"sortpaths\"),h(\"counts\");var g={family:f.font.family,size:Math.round(f.font.size),color:f.font.color};n.coerceFont(h,\"labelfont\",g);var m={family:f.font.family,size:Math.round(f.font.size/1.2),color:f.font.color};n.coerceFont(h,\"tickfont\",m)}},{\"../../components/colorscale/defaults\":653,\"../../components/colorscale/helpers\":654,\"../../lib\":778,\"../../plots/array_container_defaults\":823,\"../../plots/domain\":855,\"../parcoords/merge_length\":1158,\"./attributes\":1142}],1146:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),colorbar:{container:\"line\",min:\"cmin\",max:\"cmax\"},moduleType:\"trace\",name:\"parcats\",basePlotModule:t(\"./base_plot\"),categories:[\"noOpacity\"],meta:{}}},{\"./attributes\":1142,\"./base_plot\":1143,\"./calc\":1144,\"./defaults\":1145,\"./plot\":1148}],1147:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../plot_api/plot_api\"),a=t(\"../../components/fx\"),o=t(\"../../lib\"),s=o.strTranslate,l=t(\"../../components/drawing\"),c=t(\"tinycolor2\"),u=t(\"../../lib/svg_text_utils\");function f(t,e,r,i){var a=t.map(R.bind(0,e,r)),c=i.selectAll(\"g.parcatslayer\").data([null]);c.enter().append(\"g\").attr(\"class\",\"parcatslayer\").style(\"pointer-events\",\"all\");var f=c.selectAll(\"g.trace.parcats\").data(a,h),v=f.enter().append(\"g\").attr(\"class\",\"trace parcats\");f.attr(\"transform\",(function(t){return s(t.x,t.y)})),v.append(\"g\").attr(\"class\",\"paths\");var y=f.select(\"g.paths\").selectAll(\"path.path\").data((function(t){return t.paths}),h);y.attr(\"fill\",(function(t){return t.model.color}));var _=y.enter().append(\"path\").attr(\"class\",\"path\").attr(\"stroke-opacity\",0).attr(\"fill\",(function(t){return t.model.color})).attr(\"fill-opacity\",0);b(_),y.attr(\"d\",(function(t){return t.svgD})),_.empty()||y.sort(d),y.exit().remove(),y.on(\"mouseover\",g).on(\"mouseout\",m).on(\"click\",x),v.append(\"g\").attr(\"class\",\"dimensions\");var k=f.select(\"g.dimensions\").selectAll(\"g.dimension\").data((function(t){return t.dimensions}),h);k.enter().append(\"g\").attr(\"class\",\"dimension\"),k.attr(\"transform\",(function(t){return s(t.x,0)})),k.exit().remove();var M=k.selectAll(\"g.category\").data((function(t){return t.categories}),h),A=M.enter().append(\"g\").attr(\"class\",\"category\");M.attr(\"transform\",(function(t){return s(0,t.y)})),A.append(\"rect\").attr(\"class\",\"catrect\").attr(\"pointer-events\",\"none\"),M.select(\"rect.catrect\").attr(\"fill\",\"none\").attr(\"width\",(function(t){return t.width})).attr(\"height\",(function(t){return t.height})),w(A);var S=M.selectAll(\"rect.bandrect\").data((function(t){return t.bands}),h);S.each((function(){o.raiseToTop(this)})),S.attr(\"fill\",(function(t){return t.color}));var z=S.enter().append(\"rect\").attr(\"class\",\"bandrect\").attr(\"stroke-opacity\",0).attr(\"fill\",(function(t){return t.color})).attr(\"fill-opacity\",0);S.attr(\"fill\",(function(t){return t.color})).attr(\"width\",(function(t){return t.width})).attr(\"height\",(function(t){return t.height})).attr(\"y\",(function(t){return t.y})).attr(\"cursor\",(function(t){return\"fixed\"===t.parcatsViewModel.arrangement?\"default\":\"perpendicular\"===t.parcatsViewModel.arrangement?\"ns-resize\":\"move\"})),T(z),S.exit().remove(),A.append(\"text\").attr(\"class\",\"catlabel\").attr(\"pointer-events\",\"none\");var O=e._fullLayout.paper_bgcolor;M.select(\"text.catlabel\").attr(\"text-anchor\",(function(t){return p(t)?\"start\":\"end\"})).attr(\"alignment-baseline\",\"middle\").style(\"text-shadow\",O+\" -1px 1px 2px, \"+O+\" 1px 1px 2px, \"+O+\" 1px -1px 2px, \"+O+\" -1px -1px 2px\").style(\"fill\",\"rgb(0, 0, 0)\").attr(\"x\",(function(t){return p(t)?t.width+5:-5})).attr(\"y\",(function(t){return t.height/2})).text((function(t){return t.model.categoryLabel})).each((function(t){l.font(n.select(this),t.parcatsViewModel.categorylabelfont),u.convertToTspans(n.select(this),e)})),A.append(\"text\").attr(\"class\",\"dimlabel\"),M.select(\"text.dimlabel\").attr(\"text-anchor\",\"middle\").attr(\"alignment-baseline\",\"baseline\").attr(\"cursor\",(function(t){return\"fixed\"===t.parcatsViewModel.arrangement?\"default\":\"ew-resize\"})).attr(\"x\",(function(t){return t.width/2})).attr(\"y\",-5).text((function(t,e){return 0===e?t.parcatsViewModel.model.dimensions[t.model.dimensionInd].dimensionLabel:null})).each((function(t){l.font(n.select(this),t.parcatsViewModel.labelfont)})),M.selectAll(\"rect.bandrect\").on(\"mouseover\",E).on(\"mouseout\",C),M.exit().remove(),k.call(n.behavior.drag().origin((function(t){return{x:t.x,y:0}})).on(\"dragstart\",L).on(\"drag\",I).on(\"dragend\",P)),f.each((function(t){t.traceSelection=n.select(this),t.pathSelection=n.select(this).selectAll(\"g.paths\").selectAll(\"path.path\"),t.dimensionSelection=n.select(this).selectAll(\"g.dimensions\").selectAll(\"g.dimension\")})),f.exit().remove()}function h(t){return t.key}function p(t){var e=t.parcatsViewModel.dimensions.length,r=t.parcatsViewModel.dimensions[e-1].model.dimensionInd;return t.model.dimensionInd===r}function d(t,e){return t.model.rawColor>e.model.rawColor?1:t.model.rawColor\"),C=n.mouse(f)[0];a.loneHover({trace:h,x:b-d.left+g.left,y:w-d.top+g.top,text:E,color:t.model.color,borderColor:\"black\",fontFamily:'Monaco, \"Courier New\", monospace',fontSize:10,fontColor:T,idealAlign:C1&&h.displayInd===f.dimensions.length-1?(i=c.left,a=\"left\"):(i=c.left+c.width,a=\"right\");var g=u.model.count,m=u.model.categoryLabel,v=g/u.parcatsViewModel.model.count,y={countLabel:g,categoryLabel:m,probabilityLabel:v.toFixed(3)},x=[];-1!==u.parcatsViewModel.hoverinfoItems.indexOf(\"count\")&&x.push([\"Count:\",y.countLabel].join(\" \")),-1!==u.parcatsViewModel.hoverinfoItems.indexOf(\"probability\")&&x.push([\"P(\"+y.categoryLabel+\"):\",y.probabilityLabel].join(\" \"));var b=x.join(\"
\");return{trace:p,x:o*(i-e.left),y:s*(d-e.top),text:b,color:\"lightgray\",borderColor:\"black\",fontFamily:'Monaco, \"Courier New\", monospace',fontSize:12,fontColor:\"black\",idealAlign:a,hovertemplate:p.hovertemplate,hovertemplateLabels:y,eventData:[{data:p._input,fullData:p,count:g,category:m,probability:v}]}}function E(t){if(!t.parcatsViewModel.dragDimension&&-1===t.parcatsViewModel.hoverinfoItems.indexOf(\"skip\")){if(n.mouse(this)[1]<-1)return;var e,r=t.parcatsViewModel.graphDiv,i=r._fullLayout,s=i._paperdiv.node().getBoundingClientRect(),l=t.parcatsViewModel.hoveron;if(\"color\"===l?(!function(t){var e=n.select(t).datum(),r=k(e);_(r),r.each((function(){o.raiseToTop(this)})),n.select(t.parentNode).selectAll(\"rect.bandrect\").filter((function(t){return t.color===e.color})).each((function(){o.raiseToTop(this),n.select(this).attr(\"stroke\",\"black\").attr(\"stroke-width\",1.5)}))}(this),A(this,\"plotly_hover\",n.event)):(!function(t){n.select(t.parentNode).selectAll(\"rect.bandrect\").each((function(t){var e=k(t);_(e),e.each((function(){o.raiseToTop(this)}))})),n.select(t.parentNode).select(\"rect.catrect\").attr(\"stroke\",\"black\").attr(\"stroke-width\",2.5)}(this),M(this,\"plotly_hover\",n.event)),-1===t.parcatsViewModel.hoverinfoItems.indexOf(\"none\"))\"category\"===l?e=S(r,s,this):\"color\"===l?e=function(t,e,r){t._fullLayout._calcInverseTransform(t);var i,a,o=t._fullLayout._invScaleX,s=t._fullLayout._invScaleY,l=r.getBoundingClientRect(),u=n.select(r).datum(),f=u.categoryViewModel,h=f.parcatsViewModel,p=h.model.dimensions[f.model.dimensionInd],d=h.trace,g=l.y+l.height/2;h.dimensions.length>1&&p.displayInd===h.dimensions.length-1?(i=l.left,a=\"left\"):(i=l.left+l.width,a=\"right\");var m=f.model.categoryLabel,v=u.parcatsViewModel.model.count,y=0;u.categoryViewModel.bands.forEach((function(t){t.color===u.color&&(y+=t.count)}));var x=f.model.count,b=0;h.pathSelection.each((function(t){t.model.color===u.color&&(b+=t.model.count)}));var _=y/v,w=y/b,T=y/x,k={countLabel:v,categoryLabel:m,probabilityLabel:_.toFixed(3)},M=[];-1!==f.parcatsViewModel.hoverinfoItems.indexOf(\"count\")&&M.push([\"Count:\",k.countLabel].join(\" \")),-1!==f.parcatsViewModel.hoverinfoItems.indexOf(\"probability\")&&(M.push(\"P(color \\u2229 \"+m+\"): \"+k.probabilityLabel),M.push(\"P(\"+m+\" | color): \"+w.toFixed(3)),M.push(\"P(color | \"+m+\"): \"+T.toFixed(3)));var A=M.join(\"
\"),S=c.mostReadable(u.color,[\"black\",\"white\"]);return{trace:d,x:o*(i-e.left),y:s*(g-e.top),text:A,color:u.color,borderColor:\"black\",fontFamily:'Monaco, \"Courier New\", monospace',fontColor:S,fontSize:10,idealAlign:a,hovertemplate:d.hovertemplate,hovertemplateLabels:k,eventData:[{data:d._input,fullData:d,category:m,count:v,probability:_,categorycount:x,colorcount:b,bandcolorcount:y}]}}(r,s,this):\"dimension\"===l&&(e=function(t,e,r){var i=[];return n.select(r.parentNode.parentNode).selectAll(\"g.category\").select(\"rect.catrect\").each((function(){i.push(S(t,e,this))})),i}(r,s,this)),e&&a.loneHover(e,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:r})}}function C(t){var e=t.parcatsViewModel;if(!e.dragDimension&&(b(e.pathSelection),w(e.dimensionSelection.selectAll(\"g.category\")),T(e.dimensionSelection.selectAll(\"g.category\").selectAll(\"rect.bandrect\")),a.loneUnhover(e.graphDiv._fullLayout._hoverlayer.node()),e.pathSelection.sort(d),-1===e.hoverinfoItems.indexOf(\"skip\"))){\"color\"===t.parcatsViewModel.hoveron?A(this,\"plotly_unhover\",n.event):M(this,\"plotly_unhover\",n.event)}}function L(t){\"fixed\"!==t.parcatsViewModel.arrangement&&(t.dragDimensionDisplayInd=t.model.displayInd,t.initialDragDimensionDisplayInds=t.parcatsViewModel.model.dimensions.map((function(t){return t.displayInd})),t.dragHasMoved=!1,t.dragCategoryDisplayInd=null,n.select(this).selectAll(\"g.category\").select(\"rect.catrect\").each((function(e){var r=n.mouse(this)[0],i=n.mouse(this)[1];-2<=r&&r<=e.width+2&&-2<=i&&i<=e.height+2&&(t.dragCategoryDisplayInd=e.model.displayInd,t.initialDragCategoryDisplayInds=t.model.categories.map((function(t){return t.displayInd})),e.model.dragY=e.y,o.raiseToTop(this.parentNode),n.select(this.parentNode).selectAll(\"rect.bandrect\").each((function(e){e.yf.y+f.height/2&&(o.model.displayInd=f.model.displayInd,f.model.displayInd=l),t.dragCategoryDisplayInd=o.model.displayInd}if(null===t.dragCategoryDisplayInd||\"freeform\"===t.parcatsViewModel.arrangement){a.model.dragX=n.event.x;var h=t.parcatsViewModel.dimensions[r],p=t.parcatsViewModel.dimensions[i];void 0!==h&&a.model.dragXp.x&&(a.model.displayInd=p.model.displayInd,p.model.displayInd=t.dragDimensionDisplayInd),t.dragDimensionDisplayInd=a.model.displayInd}N(t.parcatsViewModel),B(t.parcatsViewModel),D(t.parcatsViewModel),O(t.parcatsViewModel)}}function P(t){if(\"fixed\"!==t.parcatsViewModel.arrangement&&null!==t.dragDimensionDisplayInd){n.select(this).selectAll(\"text\").attr(\"font-weight\",\"normal\");var e={},r=z(t.parcatsViewModel),a=t.parcatsViewModel.model.dimensions.map((function(t){return t.displayInd})),o=t.initialDragDimensionDisplayInds.some((function(t,e){return t!==a[e]}));o&&a.forEach((function(r,n){var i=t.parcatsViewModel.model.dimensions[n].containerInd;e[\"dimensions[\"+i+\"].displayindex\"]=r}));var s=!1;if(null!==t.dragCategoryDisplayInd){var l=t.model.categories.map((function(t){return t.displayInd}));if(s=t.initialDragCategoryDisplayInds.some((function(t,e){return t!==l[e]}))){var c=t.model.categories.slice().sort((function(t,e){return t.displayInd-e.displayInd})),u=c.map((function(t){return t.categoryValue})),f=c.map((function(t){return t.categoryLabel}));e[\"dimensions[\"+t.model.containerInd+\"].categoryarray\"]=[u],e[\"dimensions[\"+t.model.containerInd+\"].ticktext\"]=[f],e[\"dimensions[\"+t.model.containerInd+\"].categoryorder\"]=\"array\"}}if(-1===t.parcatsViewModel.hoverinfoItems.indexOf(\"skip\")&&!t.dragHasMoved&&t.potentialClickBand&&(\"color\"===t.parcatsViewModel.hoveron?A(t.potentialClickBand,\"plotly_click\",n.event.sourceEvent):M(t.potentialClickBand,\"plotly_click\",n.event.sourceEvent)),t.model.dragX=null,null!==t.dragCategoryDisplayInd)t.parcatsViewModel.dimensions[t.dragDimensionDisplayInd].categories[t.dragCategoryDisplayInd].model.dragY=null,t.dragCategoryDisplayInd=null;t.dragDimensionDisplayInd=null,t.parcatsViewModel.dragDimension=null,t.dragHasMoved=null,t.potentialClickBand=null,N(t.parcatsViewModel),B(t.parcatsViewModel),n.transition().duration(300).ease(\"cubic-in-out\").each((function(){D(t.parcatsViewModel,!0),O(t.parcatsViewModel,!0)})).each(\"end\",(function(){(o||s)&&i.restyle(t.parcatsViewModel.graphDiv,e,[r])}))}}function z(t){for(var e,r=t.graphDiv._fullData,n=0;n=0;s--)u+=\"C\"+c[s]+\",\"+(e[s+1]+i)+\" \"+l[s]+\",\"+(e[s]+i)+\" \"+(t[s]+r[s])+\",\"+(e[s]+i),u+=\"l-\"+r[s]+\",0 \";return u+=\"Z\"}function B(t){var e=t.dimensions,r=t.model,n=e.map((function(t){return t.categories.map((function(t){return t.y}))})),i=t.model.dimensions.map((function(t){return t.categories.map((function(t){return t.displayInd}))})),a=t.model.dimensions.map((function(t){return t.displayInd})),o=t.dimensions.map((function(t){return t.model.dimensionInd})),s=e.map((function(t){return t.x})),l=e.map((function(t){return t.width})),c=[];for(var u in r.paths)r.paths.hasOwnProperty(u)&&c.push(r.paths[u]);function f(t){var e=t.categoryInds.map((function(t,e){return i[e][t]}));return o.map((function(t){return e[t]}))}c.sort((function(e,r){var n=f(e),i=f(r);return\"backward\"===t.sortpaths&&(n.reverse(),i.reverse()),n.push(e.valueInds[0]),i.push(r.valueInds[0]),t.bundlecolors&&(n.unshift(e.rawColor),i.unshift(r.rawColor)),ni?1:0}));for(var h=new Array(c.length),p=e[0].model.count,d=e[0].categories.map((function(t){return t.height})).reduce((function(t,e){return t+e})),g=0;g0?d*(v.count/p):0;for(var y,x=new Array(n.length),b=0;b1?(t.width-80-16)/(n-1):0)*i;var a,o,s,l,c,u=[],f=t.model.maxCats,h=e.categories.length,p=e.count,d=t.height-8*(f-1),g=8*(f-h)/2,m=e.categories.map((function(t){return{displayInd:t.displayInd,categoryInd:t.categoryInd}}));for(m.sort((function(t,e){return t.displayInd-e.displayInd})),c=0;c0?o.count/p*d:0,s={key:o.valueInds[0],model:o,width:16,height:a,y:null!==o.dragY?o.dragY:g,bands:[],parcatsViewModel:t},g=g+a+8,u.push(s);return{key:e.dimensionInd,x:null!==e.dragX?e.dragX:r,y:0,width:16,model:e,categories:u,parcatsViewModel:t,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}e.exports=function(t,e,r,n){f(r,t,n,e)}},{\"../../components/drawing\":665,\"../../components/fx\":683,\"../../lib\":778,\"../../lib/svg_text_utils\":803,\"../../plot_api/plot_api\":814,d3:169,tinycolor2:576}],1148:[function(t,e,r){\"use strict\";var n=t(\"./parcats\");e.exports=function(t,e,r,i){var a=t._fullLayout,o=a._paper,s=a._size;n(t,o,e,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},r,i)}},{\"./parcats\":1147}],1149:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/cartesian/layout_attributes\"),a=t(\"../../plots/font_attributes\"),o=t(\"../../plots/domain\").attributes,s=t(\"../../lib/extend\").extendFlat,l=t(\"../../plot_api/plot_template\").templatedArray;e.exports={domain:o({name:\"parcoords\",trace:!0,editType:\"plot\"}),labelangle:{valType:\"angle\",dflt:0,editType:\"plot\"},labelside:{valType:\"enumerated\",values:[\"top\",\"bottom\"],dflt:\"top\",editType:\"plot\"},labelfont:a({editType:\"plot\"}),tickfont:a({editType:\"plot\"}),rangefont:a({editType:\"plot\"}),dimensions:l(\"dimension\",{label:{valType:\"string\",editType:\"plot\"},tickvals:s({},i.tickvals,{editType:\"plot\"}),ticktext:s({},i.ticktext,{editType:\"plot\"}),tickformat:s({},i.tickformat,{editType:\"plot\"}),visible:{valType:\"boolean\",dflt:!0,editType:\"plot\"},range:{valType:\"info_array\",items:[{valType:\"number\",editType:\"plot\"},{valType:\"number\",editType:\"plot\"}],editType:\"plot\"},constraintrange:{valType:\"info_array\",freeLength:!0,dimensions:\"1-2\",items:[{valType:\"number\",editType:\"plot\"},{valType:\"number\",editType:\"plot\"}],editType:\"plot\"},multiselect:{valType:\"boolean\",dflt:!0,editType:\"plot\"},values:{valType:\"data_array\",editType:\"calc\"},editType:\"calc\"}),line:s({editType:\"calc\"},n(\"line\",{colorscaleDflt:\"Viridis\",autoColorDflt:!1,editTypeOverride:\"calc\"}))}},{\"../../components/colorscale/attributes\":650,\"../../lib/extend\":768,\"../../plot_api/plot_template\":817,\"../../plots/cartesian/layout_attributes\":842,\"../../plots/domain\":855,\"../../plots/font_attributes\":856}],1150:[function(t,e,r){\"use strict\";var n=t(\"./constants\"),i=t(\"d3\"),a=t(\"../../lib/gup\").keyFun,o=t(\"../../lib/gup\").repeat,s=t(\"../../lib\").sorterAsc,l=t(\"../../lib\").strTranslate,c=n.bar.snapRatio;function u(t,e){return t*(1-c)+e*c}var f=n.bar.snapClose;function h(t,e){return t*(1-f)+e*f}function p(t,e,r,n){if(function(t,e){for(var r=0;r=e[r][0]&&t<=e[r][1])return!0;return!1}(r,n))return r;var i=t?-1:1,a=0,o=e.length-1;if(i<0){var s=a;a=o,o=s}for(var l=e[a],c=l,f=a;i*fe){h=r;break}}if(a=u,isNaN(a)&&(a=isNaN(f)||isNaN(h)?isNaN(f)?h:f:e-c[f][1]t[1]+r||e=.9*t[1]+.1*t[0]?\"n\":e<=.9*t[0]+.1*t[1]?\"s\":\"ns\"}(d,e);g&&(o.interval=l[a],o.intervalPix=d,o.region=g)}}if(t.ordinal&&!o.region){var m=t.unitTickvals,y=t.unitToPaddedPx.invert(e);for(r=0;r=x[0]&&y<=x[1]){o.clickableOrdinalRange=x;break}}}return o}function w(t,e){i.event.sourceEvent.stopPropagation();var r=e.height-i.mouse(t)[1]-2*n.verticalPadding,a=e.brush.svgBrush;a.wasDragged=!0,a._dragging=!0,a.grabbingBar?a.newExtent=[r-a.grabPoint,r+a.barLength-a.grabPoint].map(e.unitToPaddedPx.invert):a.newExtent=[a.startExtent,e.unitToPaddedPx.invert(r)].sort(s),e.brush.filterSpecified=!0,a.extent=a.stayingIntervals.concat([a.newExtent]),a.brushCallback(e),b(t.parentNode)}function T(t,e){var r=_(e,e.height-i.mouse(t)[1]-2*n.verticalPadding),a=\"crosshair\";r.clickableOrdinalRange?a=\"pointer\":r.region&&(a=r.region+\"-resize\"),i.select(document.body).style(\"cursor\",a)}function k(t){t.on(\"mousemove\",(function(t){i.event.preventDefault(),t.parent.inBrushDrag||T(this,t)})).on(\"mouseleave\",(function(t){t.parent.inBrushDrag||y()})).call(i.behavior.drag().on(\"dragstart\",(function(t){!function(t,e){i.event.sourceEvent.stopPropagation();var r=e.height-i.mouse(t)[1]-2*n.verticalPadding,a=e.unitToPaddedPx.invert(r),o=e.brush,s=_(e,r),l=s.interval,c=o.svgBrush;if(c.wasDragged=!1,c.grabbingBar=\"ns\"===s.region,c.grabbingBar){var u=l.map(e.unitToPaddedPx);c.grabPoint=r-u[0]-n.verticalPadding,c.barLength=u[1]-u[0]}c.clickableOrdinalRange=s.clickableOrdinalRange,c.stayingIntervals=e.multiselect&&o.filterSpecified?o.filter.getConsolidated():[],l&&(c.stayingIntervals=c.stayingIntervals.filter((function(t){return t[0]!==l[0]&&t[1]!==l[1]}))),c.startExtent=s.region?l[\"s\"===s.region?1:0]:a,e.parent.inBrushDrag=!0,c.brushStartCallback()}(this,t)})).on(\"drag\",(function(t){w(this,t)})).on(\"dragend\",(function(t){!function(t,e){var r=e.brush,n=r.filter,a=r.svgBrush;a._dragging||(T(t,e),w(t,e),e.brush.svgBrush.wasDragged=!1),a._dragging=!1,i.event.sourceEvent.stopPropagation();var o=a.grabbingBar;if(a.grabbingBar=!1,a.grabLocation=void 0,e.parent.inBrushDrag=!1,y(),!a.wasDragged)return a.wasDragged=void 0,a.clickableOrdinalRange?r.filterSpecified&&e.multiselect?a.extent.push(a.clickableOrdinalRange):(a.extent=[a.clickableOrdinalRange],r.filterSpecified=!0):o?(a.extent=a.stayingIntervals,0===a.extent.length&&A(r)):A(r),a.brushCallback(e),b(t.parentNode),void a.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);var s=function(){n.set(n.getConsolidated())};if(e.ordinal){var l=e.unitTickvals;l[l.length-1]a.newExtent[0];a.extent=a.stayingIntervals.concat(c?[a.newExtent]:[]),a.extent.length||A(r),a.brushCallback(e),c?b(t.parentNode,s):(s(),b(t.parentNode))}else s();a.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}(this,t)})))}function M(t,e){return t[0]-e[0]}function A(t){t.filterSpecified=!1,t.svgBrush.extent=[[-1/0,1/0]]}function S(t){for(var e,r=t.slice(),n=[],i=r.shift();i;){for(e=i.slice();(i=r.shift())&&i[0]<=e[1];)e[1]=Math.max(e[1],i[1]);n.push(e)}return 1===n.length&&n[0][0]>n[0][1]&&(n=[]),n}e.exports={makeBrush:function(t,e,r,n,i,a){var o,l=function(){var t,e,r=[];return{set:function(n){1===(r=n.map((function(t){return t.slice().sort(s)})).sort(M)).length&&r[0][0]===-1/0&&r[0][1]===1/0&&(r=[[0,-1]]),t=S(r),e=r.reduce((function(t,e){return[Math.min(t[0],e[0]),Math.max(t[1],e[1])]}),[1/0,-1/0])},get:function(){return r.slice()},getConsolidated:function(){return t},getBounds:function(){return e}}}();return l.set(r),{filter:l,filterSpecified:e,svgBrush:{extent:[],brushStartCallback:n,brushCallback:(o=i,function(t){var e=t.brush,r=function(t){return t.svgBrush.extent.map((function(t){return t.slice()}))}(e).slice();e.filter.set(r),o()}),brushEndCallback:a}}},ensureAxisBrush:function(t){var e=t.selectAll(\".\"+n.cn.axisBrush).data(o,a);e.enter().append(\"g\").classed(n.cn.axisBrush,!0),function(t){var e=t.selectAll(\".background\").data(o);e.enter().append(\"rect\").classed(\"background\",!0).call(d).call(g).style(\"pointer-events\",\"auto\").attr(\"transform\",l(0,n.verticalPadding)),e.call(k).attr(\"height\",(function(t){return t.height-n.verticalPadding}));var r=t.selectAll(\".highlight-shadow\").data(o);r.enter().append(\"line\").classed(\"highlight-shadow\",!0).attr(\"x\",-n.bar.width/2).attr(\"stroke-width\",n.bar.width+n.bar.strokeWidth).attr(\"stroke\",n.bar.strokeColor).attr(\"opacity\",n.bar.strokeOpacity).attr(\"stroke-linecap\",\"butt\"),r.attr(\"y1\",(function(t){return t.height})).call(x);var i=t.selectAll(\".highlight\").data(o);i.enter().append(\"line\").classed(\"highlight\",!0).attr(\"x\",-n.bar.width/2).attr(\"stroke-width\",n.bar.width-n.bar.strokeWidth).attr(\"stroke\",n.bar.fillColor).attr(\"opacity\",n.bar.fillOpacity).attr(\"stroke-linecap\",\"butt\"),i.attr(\"y1\",(function(t){return t.height})).call(x)}(e)},cleanRanges:function(t,e){if(Array.isArray(t[0])?(t=t.map((function(t){return t.sort(s)})),t=e.multiselect?S(t.sort(M)):[t[0]]):t=[t.sort(s)],e.tickvals){var r=e.tickvals.slice().sort(s);if(!(t=t.map((function(t){var e=[p(0,r,t[0],[]),p(1,r,t[1],[])];if(e[1]>e[0])return e})).filter((function(t){return t}))).length)return}return t.length>1?t:t[0]}}},{\"../../lib\":778,\"../../lib/gup\":775,\"./constants\":1153,d3:169}],1151:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../plots/get_data\").getModuleCalcData,a=t(\"./plot\"),o=t(\"../../constants/xmlns_namespaces\");r.name=\"parcoords\",r.plot=function(t){var e=i(t.calcdata,\"parcoords\")[0];e.length&&a(t,e)},r.clean=function(t,e,r,n){var i=n._has&&n._has(\"parcoords\"),a=e._has&&e._has(\"parcoords\");i&&!a&&(n._paperdiv.selectAll(\".parcoords\").remove(),n._glimages.selectAll(\"*\").remove())},r.toSVG=function(t){var e=t._fullLayout._glimages,r=n.select(t).selectAll(\".svg-container\");r.filter((function(t,e){return e===r.size()-1})).selectAll(\".gl-canvas-context, .gl-canvas-focus\").each((function(){var t=this.toDataURL(\"image/png\");e.append(\"svg:image\").attr({xmlns:o.svg,\"xlink:href\":t,preserveAspectRatio:\"none\",x:0,y:0,width:this.width,height:this.height})})),window.setTimeout((function(){n.selectAll(\"#filterBarPattern\").attr(\"id\",\"filterBarPattern\")}),60)}},{\"../../constants/xmlns_namespaces\":754,\"../../plots/get_data\":865,\"./plot\":1160,d3:169}],1152:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isArrayOrTypedArray,i=t(\"../../components/colorscale\"),a=t(\"../../lib/gup\").wrap;e.exports=function(t,e){var r,o;return i.hasColorscale(e,\"line\")&&n(e.line.color)?(r=e.line.color,o=i.extractOpts(e.line).colorscale,i.calc(t,e,{vals:r,containerStr:\"line\",cLetter:\"c\"})):(r=function(t){for(var e=new Array(t),r=0;rf&&(n.log(\"parcoords traces support up to \"+f+\" dimensions at the moment\"),d.splice(f));var g=s(t,e,{name:\"dimensions\",layout:l,handleItemDefaults:p}),m=function(t,e,r,o,s){var l=s(\"line.color\",r);if(i(t,\"line\")&&n.isArrayOrTypedArray(l)){if(l.length)return s(\"line.colorscale\"),a(t,e,o,s,{prefix:\"line.\",cLetter:\"c\"}),l.length;e.line.color=r}return 1/0}(t,e,r,l,u);o(e,l,u),Array.isArray(g)&&g.length||(e.visible=!1),h(e,g,\"values\",m);var v={family:l.font.family,size:Math.round(l.font.size/1.2),color:l.font.color};n.coerceFont(u,\"labelfont\",v),n.coerceFont(u,\"tickfont\",v),n.coerceFont(u,\"rangefont\",v),u(\"labelangle\"),u(\"labelside\")}},{\"../../components/colorscale/defaults\":653,\"../../components/colorscale/helpers\":654,\"../../lib\":778,\"../../plots/array_container_defaults\":823,\"../../plots/cartesian/axes\":828,\"../../plots/domain\":855,\"./attributes\":1149,\"./axisbrush\":1150,\"./constants\":1153,\"./merge_length\":1158}],1155:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isTypedArray;r.convertTypedArray=function(t){return n(t)?Array.prototype.slice.call(t):t},r.isOrdinal=function(t){return!!t.tickvals},r.isVisible=function(t){return t.visible||!(\"visible\"in t)}},{\"../../lib\":778}],1156:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),colorbar:{container:\"line\",min:\"cmin\",max:\"cmax\"},moduleType:\"trace\",name:\"parcoords\",basePlotModule:t(\"./base_plot\"),categories:[\"gl\",\"regl\",\"noOpacity\",\"noHover\"],meta:{}}},{\"./attributes\":1149,\"./base_plot\":1151,\"./calc\":1152,\"./defaults\":1154,\"./plot\":1160}],1157:[function(t,e,r){\"use strict\";var n=t(\"glslify\"),i=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragColor;\\n\\nattribute vec4 p01_04, p05_08, p09_12, p13_16,\\n p17_20, p21_24, p25_28, p29_32,\\n p33_36, p37_40, p41_44, p45_48,\\n p49_52, p53_56, p57_60, colors;\\n\\nuniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,\\n loA, hiA, loB, hiB, loC, hiC, loD, hiD;\\n\\nuniform vec2 resolution, viewBoxPos, viewBoxSize;\\nuniform sampler2D mask, palette;\\nuniform float maskHeight;\\nuniform float drwLayer; // 0: context, 1: focus, 2: pick\\nuniform vec4 contextColor;\\n\\nbool isPick = (drwLayer > 1.5);\\nbool isContext = (drwLayer < 0.5);\\n\\nconst vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);\\nconst vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);\\n\\nfloat val(mat4 p, mat4 v) {\\n return dot(matrixCompMult(p, v) * UNITS, UNITS);\\n}\\n\\nfloat axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {\\n float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);\\n float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);\\n return y1 * (1.0 - ratio) + y2 * ratio;\\n}\\n\\nint iMod(int a, int b) {\\n return a - b * (a / b);\\n}\\n\\nbool fOutside(float p, float lo, float hi) {\\n return (lo < hi) && (lo > p || p > hi);\\n}\\n\\nbool vOutside(vec4 p, vec4 lo, vec4 hi) {\\n return (\\n fOutside(p[0], lo[0], hi[0]) ||\\n fOutside(p[1], lo[1], hi[1]) ||\\n fOutside(p[2], lo[2], hi[2]) ||\\n fOutside(p[3], lo[3], hi[3])\\n );\\n}\\n\\nbool mOutside(mat4 p, mat4 lo, mat4 hi) {\\n return (\\n vOutside(p[0], lo[0], hi[0]) ||\\n vOutside(p[1], lo[1], hi[1]) ||\\n vOutside(p[2], lo[2], hi[2]) ||\\n vOutside(p[3], lo[3], hi[3])\\n );\\n}\\n\\nbool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {\\n return mOutside(A, loA, hiA) ||\\n mOutside(B, loB, hiB) ||\\n mOutside(C, loC, hiC) ||\\n mOutside(D, loD, hiD);\\n}\\n\\nbool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {\\n mat4 pnts[4];\\n pnts[0] = A;\\n pnts[1] = B;\\n pnts[2] = C;\\n pnts[3] = D;\\n\\n for(int i = 0; i < 4; ++i) {\\n for(int j = 0; j < 4; ++j) {\\n for(int k = 0; k < 4; ++k) {\\n if(0 == iMod(\\n int(255.0 * texture2D(mask,\\n vec2(\\n (float(i * 2 + j / 2) + 0.5) / 8.0,\\n (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight\\n ))[3]\\n ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),\\n 2\\n )) return true;\\n }\\n }\\n }\\n return false;\\n}\\n\\nvec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {\\n float x = 0.5 * sign(v) + 0.5;\\n float y = axisY(x, A, B, C, D);\\n float z = 1.0 - abs(v);\\n\\n z += isContext ? 0.0 : 2.0 * float(\\n outsideBoundingBox(A, B, C, D) ||\\n outsideRasterMask(A, B, C, D)\\n );\\n\\n return vec4(\\n 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,\\n z,\\n 1.0\\n );\\n}\\n\\nvoid main() {\\n mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);\\n mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);\\n mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);\\n mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);\\n\\n float v = colors[3];\\n\\n gl_Position = position(isContext, v, A, B, C, D);\\n\\n fragColor =\\n isContext ? vec4(contextColor) :\\n isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));\\n}\\n\"]),a=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragColor;\\n\\nvoid main() {\\n gl_FragColor = fragColor;\\n}\\n\"]),o=t(\"./constants\").maxDimensionCount,s=t(\"../../lib\"),l=new Uint8Array(4),c=new Uint8Array(4),u={shape:[256,1],format:\"rgba\",type:\"uint8\",mag:\"nearest\",min:\"nearest\"};function f(t,e,r,n,i){var a=t._gl;a.enable(a.SCISSOR_TEST),a.scissor(e,r,n,i),t.clear({color:[0,0,0,0],depth:1})}function h(t,e,r,n,i,a){var o=a.key;r.drawCompleted||(!function(t){t.read({x:0,y:0,width:1,height:1,data:l})}(t),r.drawCompleted=!0),function s(l){var c=Math.min(n,i-l*n);0===l&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],f(t,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),r.clearOnly||(a.count=2*c,a.offset=2*l*n,e(a),l*n+c>>8*e)%256/255}function g(t,e,r){for(var n=new Array(8*e),i=0,a=0;au&&(u=t[i].dim1.canvasX,o=i);0===s&&f(T,0,0,r.canvasWidth,r.canvasHeight);var p=function(t){var e,r,n,i=[[],[]];for(n=0;n<64;n++){var a=!t&&ni._length&&(A=A.slice(0,i._length));var E,C=i.tickvals;function L(t,e){return{val:t,text:E[e]}}function I(t,e){return t.val-e.val}if(Array.isArray(C)&&C.length){E=i.ticktext,Array.isArray(E)&&E.length?E.length>C.length?E=E.slice(0,C.length):C.length>E.length&&(C=C.slice(0,E.length)):E=C.map(n.format(i.tickformat));for(var P=1;P=r||l>=a)return;var c=t.lineLayer.readPixel(s,a-1-l),u=0!==c[3],f=u?c[2]+256*(c[1]+256*c[0]):null,h={x:s,y:l,clientX:e.clientX,clientY:e.clientY,dataIndex:t.model.key,curveNumber:f};f!==R&&(u?i.hover(h):i.unhover&&i.unhover(h),R=f)}})),D.style(\"opacity\",(function(t){return t.pick?0:1})),h.style(\"background\",\"rgba(255, 255, 255, 0)\");var F=h.selectAll(\".\"+v.cn.parcoords).data(A,p);F.exit().remove(),F.enter().append(\"g\").classed(v.cn.parcoords,!0).style(\"shape-rendering\",\"crispEdges\").style(\"pointer-events\",\"none\"),F.attr(\"transform\",(function(t){return l(t.model.translateX,t.model.translateY)}));var B=F.selectAll(\".\"+v.cn.parcoordsControlView).data(d,p);B.enter().append(\"g\").classed(v.cn.parcoordsControlView,!0),B.attr(\"transform\",(function(t){return l(t.model.pad.l,t.model.pad.t)}));var N=B.selectAll(\".\"+v.cn.yAxis).data((function(t){return t.dimensions}),p);N.enter().append(\"g\").classed(v.cn.yAxis,!0),B.each((function(t){P(N,t)})),D.each((function(t){if(t.viewModel){!t.lineLayer||i?t.lineLayer=x(this,t):t.lineLayer.update(t),(t.key||0===t.key)&&(t.viewModel[t.key]=t.lineLayer);var e=!t.context||i;t.lineLayer.render(t.viewModel.panels,e)}})),N.attr(\"transform\",(function(t){return l(t.xScale(t.xIndex),0)})),N.call(n.behavior.drag().origin((function(t){return t})).on(\"drag\",(function(t){var e=t.parent;M.linePickActive(!1),t.x=Math.max(-v.overdrag,Math.min(t.model.width+v.overdrag,n.event.x)),t.canvasX=t.x*t.model.canvasPixelRatio,N.sort((function(t,e){return t.x-e.x})).each((function(e,r){e.xIndex=r,e.x=t===e?e.x:e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio})),P(N,e),N.filter((function(e){return 0!==Math.abs(t.xIndex-e.xIndex)})).attr(\"transform\",(function(t){return l(t.xScale(t.xIndex),0)})),n.select(this).attr(\"transform\",l(t.x,0)),N.each((function(r,n,i){i===t.parent.key&&(e.dimensions[n]=r)})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!S(e)),e.focusLayer.render&&e.focusLayer.render(e.panels)})).on(\"dragend\",(function(t){var e=t.parent;t.x=t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio,P(N,e),n.select(this).attr(\"transform\",(function(t){return l(t.x,0)})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!S(e)),e.focusLayer&&e.focusLayer.render(e.panels),e.pickLayer&&e.pickLayer.render(e.panels,!0),M.linePickActive(!0),i&&i.axesMoved&&i.axesMoved(e.key,e.dimensions.map((function(t){return t.crossfilterDimensionIndex})))}))),N.exit().remove();var j=N.selectAll(\".\"+v.cn.axisOverlays).data(d,p);j.enter().append(\"g\").classed(v.cn.axisOverlays,!0),j.selectAll(\".\"+v.cn.axis).remove();var U=j.selectAll(\".\"+v.cn.axis).data(d,p);U.enter().append(\"g\").classed(v.cn.axis,!0),U.each((function(t){var e=t.model.height/t.model.tickDistance,r=t.domainScale,i=r.domain();n.select(this).call(n.svg.axis().orient(\"left\").tickSize(4).outerTickSize(2).ticks(e,t.tickFormat).tickValues(t.ordinal?i:null).tickFormat((function(e){return m.isOrdinal(t)?e:z(t.model.dimensions[t.visibleIndex],e)})).scale(r)),u.font(U.selectAll(\"text\"),t.model.tickFont)})),U.selectAll(\".domain, .tick>line\").attr(\"fill\",\"none\").attr(\"stroke\",\"black\").attr(\"stroke-opacity\",.25).attr(\"stroke-width\",\"1px\"),U.selectAll(\"text\").style(\"text-shadow\",\"1px 1px 1px #fff, -1px -1px 1px #fff, 1px -1px 1px #fff, -1px 1px 1px #fff\").style(\"cursor\",\"default\");var V=j.selectAll(\".\"+v.cn.axisHeading).data(d,p);V.enter().append(\"g\").classed(v.cn.axisHeading,!0);var q=V.selectAll(\".\"+v.cn.axisTitle).data(d,p);q.enter().append(\"text\").classed(v.cn.axisTitle,!0).attr(\"text-anchor\",\"middle\").style(\"cursor\",\"ew-resize\").style(\"pointer-events\",\"auto\"),q.text((function(t){return t.label})).each((function(e){var r=n.select(this);u.font(r,e.model.labelFont),c.convertToTspans(r,t)})).attr(\"transform\",(function(t){var e=I(t.model.labelAngle,t.model.labelSide),r=v.axisTitleOffset;return(e.dir>0?\"\":l(0,2*r+t.model.height))+s(e.degrees)+l(-r*e.dx,-r*e.dy)})).attr(\"text-anchor\",(function(t){var e=I(t.model.labelAngle,t.model.labelSide);return 2*Math.abs(e.dx)>Math.abs(e.dy)?e.dir*e.dx<0?\"start\":\"end\":\"middle\"}));var H=j.selectAll(\".\"+v.cn.axisExtent).data(d,p);H.enter().append(\"g\").classed(v.cn.axisExtent,!0);var G=H.selectAll(\".\"+v.cn.axisExtentTop).data(d,p);G.enter().append(\"g\").classed(v.cn.axisExtentTop,!0),G.attr(\"transform\",l(0,-v.axisExtentOffset));var Y=G.selectAll(\".\"+v.cn.axisExtentTopText).data(d,p);Y.enter().append(\"text\").classed(v.cn.axisExtentTopText,!0).call(L),Y.text((function(t){return O(t,!0)})).each((function(t){u.font(n.select(this),t.model.rangeFont)}));var W=H.selectAll(\".\"+v.cn.axisExtentBottom).data(d,p);W.enter().append(\"g\").classed(v.cn.axisExtentBottom,!0),W.attr(\"transform\",(function(t){return l(0,t.model.height+v.axisExtentOffset)}));var X=W.selectAll(\".\"+v.cn.axisExtentBottomText).data(d,p);X.enter().append(\"text\").classed(v.cn.axisExtentBottomText,!0).attr(\"dy\",\"0.75em\").call(L),X.text((function(t){return O(t,!1)})).each((function(t){u.font(n.select(this),t.model.rangeFont)})),y.ensureAxisBrush(j)}},{\"../../components/colorscale\":655,\"../../components/drawing\":665,\"../../lib\":778,\"../../lib/gup\":775,\"../../lib/svg_text_utils\":803,\"../../plots/cartesian/axes\":828,\"./axisbrush\":1150,\"./constants\":1153,\"./helpers\":1155,\"./lines\":1157,\"color-rgba\":127,d3:169}],1160:[function(t,e,r){\"use strict\";var n=t(\"./parcoords\"),i=t(\"../../lib/prepare_regl\"),a=t(\"./helpers\").isVisible;function o(t,e,r){var n=e.indexOf(r),i=t.indexOf(n);return-1===i&&(i+=e.length),i}e.exports=function(t,e){var r=t._fullLayout;if(i(t)){var s={},l={},c={},u={},f=r._size;e.forEach((function(e,r){var n=e[0].trace;c[r]=n.index;var i=u[r]=n._fullInput.index;s[r]=t.data[i].dimensions,l[r]=t.data[i].dimensions.slice()}));n(t,e,{width:f.w,height:f.h,margin:{t:f.t,r:f.r,b:f.b,l:f.l}},{filterChanged:function(e,n,i){var a=l[e][n],o=i.map((function(t){return t.slice()})),s=\"dimensions[\"+n+\"].constraintrange\",f=r._tracePreGUI[t._fullData[c[e]]._fullInput.uid];if(void 0===f[s]){var h=a.constraintrange;f[s]=h||null}var p=t._fullData[c[e]].dimensions[n];o.length?(1===o.length&&(o=o[0]),a.constraintrange=o,p.constraintrange=o.slice(),o=[o]):(delete a.constraintrange,delete p.constraintrange,o=null);var d={};d[s]=o,t.emit(\"plotly_restyle\",[d,[u[e]]])},hover:function(e){t.emit(\"plotly_hover\",e)},unhover:function(e){t.emit(\"plotly_unhover\",e)},axesMoved:function(e,r){var n=function(t,e){return function(r,n){return o(t,e,r)-o(t,e,n)}}(r,l[e].filter(a));s[e].sort(n),l[e].filter((function(t){return!a(t)})).sort((function(t){return l[e].indexOf(t)})).forEach((function(t){s[e].splice(s[e].indexOf(t),1),s[e].splice(l[e].indexOf(t),0,t)})),t.emit(\"plotly_restyle\",[{dimensions:[s[e]]},[u[e]]])}})}}},{\"../../lib/prepare_regl\":791,\"./helpers\":1155,\"./parcoords\":1159}],1161:[function(t,e,r){\"use strict\";var n=t(\"../../plots/attributes\"),i=t(\"../../plots/domain\").attributes,a=t(\"../../plots/font_attributes\"),o=t(\"../../components/color/attributes\"),s=t(\"../../plots/template_attributes\").hovertemplateAttrs,l=t(\"../../plots/template_attributes\").texttemplateAttrs,c=t(\"../../lib/extend\").extendFlat,u=a({editType:\"plot\",arrayOk:!0,colorEditType:\"plot\"});e.exports={labels:{valType:\"data_array\",editType:\"calc\"},label0:{valType:\"number\",dflt:0,editType:\"calc\"},dlabel:{valType:\"number\",dflt:1,editType:\"calc\"},values:{valType:\"data_array\",editType:\"calc\"},marker:{colors:{valType:\"data_array\",editType:\"calc\"},line:{color:{valType:\"color\",dflt:o.defaultLine,arrayOk:!0,editType:\"style\"},width:{valType:\"number\",min:0,dflt:0,arrayOk:!0,editType:\"style\"},editType:\"calc\"},editType:\"calc\"},text:{valType:\"data_array\",editType:\"plot\"},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"style\"},scalegroup:{valType:\"string\",dflt:\"\",editType:\"calc\"},textinfo:{valType:\"flaglist\",flags:[\"label\",\"text\",\"value\",\"percent\"],extras:[\"none\"],editType:\"calc\"},hoverinfo:c({},n.hoverinfo,{flags:[\"label\",\"text\",\"value\",\"percent\",\"name\"]}),hovertemplate:s({},{keys:[\"label\",\"color\",\"value\",\"percent\",\"text\"]}),texttemplate:l({editType:\"plot\"},{keys:[\"label\",\"color\",\"value\",\"percent\",\"text\"]}),textposition:{valType:\"enumerated\",values:[\"inside\",\"outside\",\"auto\",\"none\"],dflt:\"auto\",arrayOk:!0,editType:\"plot\"},textfont:c({},u,{}),insidetextorientation:{valType:\"enumerated\",values:[\"horizontal\",\"radial\",\"tangential\",\"auto\"],dflt:\"auto\",editType:\"plot\"},insidetextfont:c({},u,{}),outsidetextfont:c({},u,{}),automargin:{valType:\"boolean\",dflt:!1,editType:\"plot\"},title:{text:{valType:\"string\",dflt:\"\",editType:\"plot\"},font:c({},u,{}),position:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle center\",\"bottom left\",\"bottom center\",\"bottom right\"],editType:\"plot\"},editType:\"plot\"},domain:i({name:\"pie\",trace:!0,editType:\"calc\"}),hole:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"},sort:{valType:\"boolean\",dflt:!0,editType:\"calc\"},direction:{valType:\"enumerated\",values:[\"clockwise\",\"counterclockwise\"],dflt:\"counterclockwise\",editType:\"calc\"},rotation:{valType:\"number\",min:-360,max:360,dflt:0,editType:\"calc\"},pull:{valType:\"number\",min:0,max:1,dflt:0,arrayOk:!0,editType:\"calc\"},_deprecated:{title:{valType:\"string\",dflt:\"\",editType:\"calc\"},titlefont:c({},u,{}),titleposition:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle center\",\"bottom left\",\"bottom center\",\"bottom right\"],editType:\"calc\"}}}},{\"../../components/color/attributes\":642,\"../../lib/extend\":768,\"../../plots/attributes\":824,\"../../plots/domain\":855,\"../../plots/font_attributes\":856,\"../../plots/template_attributes\":906}],1162:[function(t,e,r){\"use strict\";var n=t(\"../../plots/plots\");r.name=\"pie\",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{\"../../plots/plots\":891}],1163:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"tinycolor2\"),a=t(\"../../components/color\"),o={};function s(t){return function(e,r){return!!e&&(!!(e=i(e)).isValid()&&(e=a.addOpacity(e,e.getAlpha()),t[r]||(t[r]=e),e))}}function l(t,e){var r,n=JSON.stringify(t),a=e[n];if(!a){for(a=t.slice(),r=0;r0){s=!0;break}}s||(o=0)}return{hasLabels:r,hasValues:a,len:o}}e.exports={handleLabelsAndValues:l,supplyDefaults:function(t,e,r,n){function c(r,n){return i.coerce(t,e,a,r,n)}var u=l(c(\"labels\"),c(\"values\")),f=u.len;if(e._hasLabels=u.hasLabels,e._hasValues=u.hasValues,!e._hasLabels&&e._hasValues&&(c(\"label0\"),c(\"dlabel\")),f){e._length=f,c(\"marker.line.width\")&&c(\"marker.line.color\"),c(\"marker.colors\"),c(\"scalegroup\");var h,p=c(\"text\"),d=c(\"texttemplate\");if(d||(h=c(\"textinfo\",Array.isArray(p)?\"text+percent\":\"percent\")),c(\"hovertext\"),c(\"hovertemplate\"),d||h&&\"none\"!==h){var g=c(\"textposition\");s(t,e,n,c,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(g)||\"auto\"===g||\"outside\"===g)&&c(\"automargin\"),(\"inside\"===g||\"auto\"===g||Array.isArray(g))&&c(\"insidetextorientation\")}o(e,n,c);var m=c(\"hole\");if(c(\"title.text\")){var v=c(\"title.position\",m?\"middle center\":\"top center\");m||\"middle center\"!==v||(e.title.position=\"top center\"),i.coerceFont(c,\"title.font\",n.font)}c(\"sort\"),c(\"direction\"),c(\"rotation\"),c(\"pull\")}else e.visible=!1}}},{\"../../lib\":778,\"../../plots/domain\":855,\"../bar/defaults\":925,\"./attributes\":1161,\"fast-isnumeric\":241}],1165:[function(t,e,r){\"use strict\";var n=t(\"../../components/fx/helpers\").appendArrayMultiPointValues;e.exports=function(t,e){var r={curveNumber:e.index,pointNumbers:t.pts,data:e._input,fullData:e,label:t.label,color:t.color,value:t.v,percent:t.percent,text:t.text,v:t.v};return 1===t.pts.length&&(r.pointNumber=r.i=t.pts[0]),n(r,e,t.pts),\"funnelarea\"===e.type&&(delete r.v,delete r.i),r}},{\"../../components/fx/helpers\":679}],1166:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");function i(t){return-1!==t.indexOf(\"e\")?t.replace(/[.]?0+e/,\"e\"):-1!==t.indexOf(\".\")?t.replace(/[.]?0+$/,\"\"):t}r.formatPiePercent=function(t,e){var r=i((100*t).toPrecision(3));return n.numSeparate(r,e)+\"%\"},r.formatPieValue=function(t,e){var r=i(t.toPrecision(10));return n.numSeparate(r,e)},r.getFirstFilled=function(t,e){if(Array.isArray(t))for(var r=0;r\"),name:u.hovertemplate||-1!==f.indexOf(\"name\")?u.name:void 0,idealAlign:t.pxmid[0]<0?\"left\":\"right\",color:m.castOption(b.bgcolor,t.pts)||t.color,borderColor:m.castOption(b.bordercolor,t.pts),fontFamily:m.castOption(_.family,t.pts),fontSize:m.castOption(_.size,t.pts),fontColor:m.castOption(_.color,t.pts),nameLength:m.castOption(b.namelength,t.pts),textAlign:m.castOption(b.align,t.pts),hovertemplate:m.castOption(u.hovertemplate,t.pts),hovertemplateLabels:t,eventData:[v(t,u)]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:e}),o._hasHoverLabel=!0}o._hasHoverEvent=!0,e.emit(\"plotly_hover\",{points:[v(t,u)],event:n.event})}})),t.on(\"mouseout\",(function(t){var r=e._fullLayout,i=e._fullData[o.index],s=n.select(this).datum();o._hasHoverEvent&&(t.originalEvent=n.event,e.emit(\"plotly_unhover\",{points:[v(s,i)],event:n.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(a.loneUnhover(r._hoverlayer.node()),o._hasHoverLabel=!1)})),t.on(\"click\",(function(t){var r=e._fullLayout,i=e._fullData[o.index];e._dragging||!1===r.hovermode||(e._hoverdata=[v(t,i)],a.click(e,n.event))}))}function b(t,e,r){var n=m.castOption(t.insidetextfont.color,e.pts);!n&&t._input.textfont&&(n=m.castOption(t._input.textfont.color,e.pts));var i=m.castOption(t.insidetextfont.family,e.pts)||m.castOption(t.textfont.family,e.pts)||r.family,a=m.castOption(t.insidetextfont.size,e.pts)||m.castOption(t.textfont.size,e.pts)||r.size;return{color:n||o.contrast(e.color),family:i,size:a}}function _(t,e){for(var r,n,i=0;ie&&e>n||r=-4;m-=2)v(Math.PI*m,\"tan\");for(m=4;m>=-4;m-=2)v(Math.PI*(m+1),\"tan\")}if(f||p){for(m=4;m>=-4;m-=2)v(Math.PI*(m+1.5),\"rad\");for(m=4;m>=-4;m-=2)v(Math.PI*(m+.5),\"rad\")}}if(s||d||f){var y=Math.sqrt(t.width*t.width+t.height*t.height);if((a={scale:i*n*2/y,rCenter:1-i,rotate:0}).textPosAngle=(e.startangle+e.stopangle)/2,a.scale>=1)return a;g.push(a)}(d||p)&&((a=T(t,n,o,l,c)).textPosAngle=(e.startangle+e.stopangle)/2,g.push(a)),(d||h)&&((a=k(t,n,o,l,c)).textPosAngle=(e.startangle+e.stopangle)/2,g.push(a));for(var x=0,b=0,_=0;_=1)break}return g[x]}function T(t,e,r,n,i){e=Math.max(0,e-2*g);var a=t.width/t.height,o=S(a,n,e,r);return{scale:2*o/t.height,rCenter:M(a,o/e),rotate:A(i)}}function k(t,e,r,n,i){e=Math.max(0,e-2*g);var a=t.height/t.width,o=S(a,n,e,r);return{scale:2*o/t.width,rCenter:M(a,o/e),rotate:A(i+Math.PI/2)}}function M(t,e){return Math.cos(e)-t*e}function A(t){return(180/Math.PI*t+720)%180-90}function S(t,e,r,n){var i=t+1/(2*Math.tan(e));return r*Math.min(1/(Math.sqrt(i*i+.5)+i),n/(Math.sqrt(t*t+n/2)+t))}function E(t,e){return t.v!==e.vTotal||e.trace.hole?Math.min(1/(1+1/Math.sin(t.halfangle)),t.ring/2):1}function C(t,e){var r=e.pxmid[0],n=e.pxmid[1],i=t.width/2,a=t.height/2;return r<0&&(i*=-1),n<0&&(a*=-1),{scale:1,rCenter:1,rotate:0,x:i+Math.abs(a)*(i>0?1:-1)/2,y:a/(1+r*r/(n*n)),outside:!0}}function L(t,e){var r,n,i,a=t.trace,o={x:t.cx,y:t.cy},s={tx:0,ty:0};s.ty+=a.title.font.size,i=P(a),-1!==a.title.position.indexOf(\"top\")?(o.y-=(1+i)*t.r,s.ty-=t.titleBox.height):-1!==a.title.position.indexOf(\"bottom\")&&(o.y+=(1+i)*t.r);var l,c,u=(l=t.r,c=t.trace.aspectratio,l/(void 0===c?1:c)),f=e.w*(a.domain.x[1]-a.domain.x[0])/2;return-1!==a.title.position.indexOf(\"left\")?(f+=u,o.x-=(1+i)*u,s.tx+=t.titleBox.width/2):-1!==a.title.position.indexOf(\"center\")?f*=2:-1!==a.title.position.indexOf(\"right\")&&(f+=u,o.x+=(1+i)*u,s.tx-=t.titleBox.width/2),r=f/t.titleBox.width,n=I(t,e)/t.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function I(t,e){var r=t.trace,n=e.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(t.titleBox.height,n/2)}function P(t){var e,r=t.pull;if(!r)return 0;if(Array.isArray(r))for(r=0,e=0;er&&(r=t.pull[e]);return r}function z(t,e){for(var r=[],n=0;n1?(c=r.r,u=c/i.aspectratio):(u=r.r,c=u*i.aspectratio),c*=(1+i.baseratio)/2,l=c*u}o=Math.min(o,l/r.vTotal)}for(n=0;n\")}if(a){var x=l.castOption(i,e.i,\"texttemplate\");if(x){var b=function(t){return{label:t.label,value:t.v,valueLabel:m.formatPieValue(t.v,n.separators),percent:t.v/r.vTotal,percentLabel:m.formatPiePercent(t.v/r.vTotal,n.separators),color:t.color,text:t.text,customdata:l.castOption(i,t.i,\"customdata\")}}(e),_=m.getFirstFilled(i.text,e.pts);(y(_)||\"\"===_)&&(b.text=_),e.text=l.texttemplateString(x,b,t._fullLayout._d3locale,b,i._meta||{})}else e.text=\"\"}}function R(t,e){var r=t.rotate*Math.PI/180,n=Math.cos(r),i=Math.sin(r),a=(e.left+e.right)/2,o=(e.top+e.bottom)/2;t.textX=a*n-o*i,t.textY=a*i+o*n,t.noCenter=!0}e.exports={plot:function(t,e){var r=t._fullLayout,a=r._size;d(\"pie\",r),_(e,t),z(e,a);var h=l.makeTraceGroups(r._pielayer,e,\"trace\").each((function(e){var h=n.select(this),d=e[0],g=d.trace;!function(t){var e,r,n,i=t[0],a=i.r,o=i.trace,s=m.getRotationAngle(o.rotation),l=2*Math.PI/i.vTotal,c=\"px0\",u=\"px1\";if(\"counterclockwise\"===o.direction){for(e=0;ei.vTotal/2?1:0,r.halfangle=Math.PI*Math.min(r.v/i.vTotal,.5),r.ring=1-o.hole,r.rInscribed=E(r,i))}(e),h.attr(\"stroke-linejoin\",\"round\"),h.each((function(){var v=n.select(this).selectAll(\"g.slice\").data(e);v.enter().append(\"g\").classed(\"slice\",!0),v.exit().remove();var y=[[[],[]],[[],[]]],_=!1;v.each((function(i,a){if(i.hidden)n.select(this).selectAll(\"path,g\").remove();else{i.pointNumber=i.i,i.curveNumber=g.index,y[i.pxmid[1]<0?0:1][i.pxmid[0]<0?0:1].push(i);var o=d.cx,c=d.cy,u=n.select(this),h=u.selectAll(\"path.surface\").data([i]);if(h.enter().append(\"path\").classed(\"surface\",!0).style({\"pointer-events\":\"all\"}),u.call(x,t,e),g.pull){var v=+m.castOption(g.pull,i.pts)||0;v>0&&(o+=v*i.pxmid[0],c+=v*i.pxmid[1])}i.cxFinal=o,i.cyFinal=c;var T=g.hole;if(i.v===d.vTotal){var k=\"M\"+(o+i.px0[0])+\",\"+(c+i.px0[1])+L(i.px0,i.pxmid,!0,1)+L(i.pxmid,i.px0,!0,1)+\"Z\";T?h.attr(\"d\",\"M\"+(o+T*i.px0[0])+\",\"+(c+T*i.px0[1])+L(i.px0,i.pxmid,!1,T)+L(i.pxmid,i.px0,!1,T)+\"Z\"+k):h.attr(\"d\",k)}else{var M=L(i.px0,i.px1,!0,1);if(T){var A=1-T;h.attr(\"d\",\"M\"+(o+T*i.px1[0])+\",\"+(c+T*i.px1[1])+L(i.px1,i.px0,!1,T)+\"l\"+A*i.px0[0]+\",\"+A*i.px0[1]+M+\"Z\")}else h.attr(\"d\",\"M\"+o+\",\"+c+\"l\"+i.px0[0]+\",\"+i.px0[1]+M+\"Z\")}D(t,i,d);var S=m.castOption(g.textposition,i.pts),E=u.selectAll(\"g.slicetext\").data(i.text&&\"none\"!==S?[0]:[]);E.enter().append(\"g\").classed(\"slicetext\",!0),E.exit().remove(),E.each((function(){var u=l.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),h=l.ensureUniformFontSize(t,\"outside\"===S?function(t,e,r){var n=m.castOption(t.outsidetextfont.color,e.pts)||m.castOption(t.textfont.color,e.pts)||r.color,i=m.castOption(t.outsidetextfont.family,e.pts)||m.castOption(t.textfont.family,e.pts)||r.family,a=m.castOption(t.outsidetextfont.size,e.pts)||m.castOption(t.textfont.size,e.pts)||r.size;return{color:n,family:i,size:a}}(g,i,r.font):b(g,i,r.font));u.text(i.text).attr({class:\"slicetext\",transform:\"\",\"text-anchor\":\"middle\"}).call(s.font,h).call(f.convertToTspans,t);var v,y=s.bBox(u.node());if(\"outside\"===S)v=C(y,i);else if(v=w(y,i,d),\"auto\"===S&&v.scale<1){var x=l.ensureUniformFontSize(t,g.outsidetextfont);u.call(s.font,x),v=C(y=s.bBox(u.node()),i)}var T=v.textPosAngle,k=void 0===T?i.pxmid:O(d.r,T);if(v.targetX=o+k[0]*v.rCenter+(v.x||0),v.targetY=c+k[1]*v.rCenter+(v.y||0),R(v,y),v.outside){var M=v.targetY;i.yLabelMin=M-y.height/2,i.yLabelMid=M,i.yLabelMax=M+y.height/2,i.labelExtraX=0,i.labelExtraY=0,_=!0}v.fontSize=h.size,p(g.type,v,r),e[a].transform=v,u.attr(\"transform\",l.getTextTransform(v))}))}function L(t,e,r,n){var a=n*(e[0]-t[0]),o=n*(e[1]-t[1]);return\"a\"+n*d.r+\",\"+n*d.r+\" 0 \"+i.largeArc+(r?\" 1 \":\" 0 \")+a+\",\"+o}}));var T=n.select(this).selectAll(\"g.titletext\").data(g.title.text?[0]:[]);if(T.enter().append(\"g\").classed(\"titletext\",!0),T.exit().remove(),T.each((function(){var e,r=l.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),i=g.title.text;g._meta&&(i=l.templateString(i,g._meta)),r.text(i).attr({class:\"titletext\",transform:\"\",\"text-anchor\":\"middle\"}).call(s.font,g.title.font).call(f.convertToTspans,t),e=\"middle center\"===g.title.position?function(t){var e=Math.sqrt(t.titleBox.width*t.titleBox.width+t.titleBox.height*t.titleBox.height);return{x:t.cx,y:t.cy,scale:t.trace.hole*t.r*2/e,tx:0,ty:-t.titleBox.height/2+t.trace.title.font.size}}(d):L(d,a),r.attr(\"transform\",u(e.x,e.y)+c(Math.min(1,e.scale))+u(e.tx,e.ty))})),_&&function(t,e){var r,n,i,a,o,s,l,c,u,f,h,p,d;function g(t,e){return t.pxmid[1]-e.pxmid[1]}function v(t,e){return e.pxmid[1]-t.pxmid[1]}function y(t,r){r||(r={});var i,c,u,h,p=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),d=n?t.yLabelMin:t.yLabelMax,g=n?t.yLabelMax:t.yLabelMin,v=t.cyFinal+o(t.px0[1],t.px1[1]),y=p-d;if(y*l>0&&(t.labelExtraY=y),Array.isArray(e.pull))for(c=0;c=(m.castOption(e.pull,u.pts)||0)||((t.pxmid[1]-u.pxmid[1])*l>0?(y=u.cyFinal+o(u.px0[1],u.px1[1])-d-t.labelExtraY)*l>0&&(t.labelExtraY+=y):(g+t.labelExtraY-v)*l>0&&(i=3*s*Math.abs(c-f.indexOf(t)),(h=u.cxFinal+a(u.px0[0],u.px1[0])+i-(t.cxFinal+t.pxmid[0])-t.labelExtraX)*s>0&&(t.labelExtraX+=h)))}for(n=0;n<2;n++)for(i=n?g:v,o=n?Math.max:Math.min,l=n?1:-1,r=0;r<2;r++){for(a=r?Math.max:Math.min,s=r?1:-1,(c=t[n][r]).sort(i),u=t[1-n][r],f=u.concat(c),p=[],h=0;hMath.abs(f)?s+=\"l\"+f*t.pxmid[0]/t.pxmid[1]+\",\"+f+\"H\"+(a+t.labelExtraX+c):s+=\"l\"+t.labelExtraX+\",\"+u+\"v\"+(f-u)+\"h\"+c}else s+=\"V\"+(t.yLabelMid+t.labelExtraY)+\"h\"+c;l.ensureSingle(r,\"path\",\"textline\").call(o.stroke,e.outsidetextfont.color).attr({\"stroke-width\":Math.min(2,e.outsidetextfont.size/8),d:s,fill:\"none\"})}else r.select(\"path.textline\").remove()}))}(v,g),_&&g.automargin){var k=s.bBox(h.node()),M=g.domain,A=a.w*(M.x[1]-M.x[0]),S=a.h*(M.y[1]-M.y[0]),E=(.5*A-d.r)/a.w,I=(.5*S-d.r)/a.h;i.autoMargin(t,\"pie.\"+g.uid+\".automargin\",{xl:M.x[0]-E,xr:M.x[1]+E,yb:M.y[0]-I,yt:M.y[1]+I,l:Math.max(d.cx-d.r-k.left,0),r:Math.max(k.right-(d.cx+d.r),0),b:Math.max(k.bottom-(d.cy+d.r),0),t:Math.max(d.cy-d.r-k.top,0),pad:5})}}))}));setTimeout((function(){h.selectAll(\"tspan\").each((function(){var t=n.select(this);t.attr(\"dy\")&&t.attr(\"dy\",t.attr(\"dy\"))}))}),0)},formatSliceLabel:D,transformInsideText:w,determineInsideTextFont:b,positionTitleOutside:L,prerenderTitles:_,layoutAreas:z,attachFxHandlers:x,computeTransform:R}},{\"../../components/color\":643,\"../../components/drawing\":665,\"../../components/fx\":683,\"../../lib\":778,\"../../lib/svg_text_utils\":803,\"../../plots/plots\":891,\"../bar/constants\":923,\"../bar/uniform_text\":937,\"./event_data\":1165,\"./helpers\":1166,d3:169}],1171:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"./style_one\"),a=t(\"../bar/uniform_text\").resizeText;e.exports=function(t){var e=t._fullLayout._pielayer.selectAll(\".trace\");a(t,e,\"pie\"),e.each((function(t){var e=t[0].trace,r=n.select(this);r.style({opacity:e.opacity}),r.selectAll(\"path.surface\").each((function(t){n.select(this).call(i,t,e)}))}))}},{\"../bar/uniform_text\":937,\"./style_one\":1172,d3:169}],1172:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"./helpers\").castOption;e.exports=function(t,e,r){var a=r.marker.line,o=i(a.color,e.pts)||n.defaultLine,s=i(a.width,e.pts)||0;t.style(\"stroke-width\",s).call(n.fill,e.color).call(n.stroke,o)}},{\"../../components/color\":643,\"./helpers\":1166}],1173:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\");e.exports={x:n.x,y:n.y,xy:{valType:\"data_array\",editType:\"calc\"},indices:{valType:\"data_array\",editType:\"calc\"},xbounds:{valType:\"data_array\",editType:\"calc\"},ybounds:{valType:\"data_array\",editType:\"calc\"},text:n.text,marker:{color:{valType:\"color\",arrayOk:!1,editType:\"calc\"},opacity:{valType:\"number\",min:0,max:1,dflt:1,arrayOk:!1,editType:\"calc\"},blend:{valType:\"boolean\",dflt:null,editType:\"calc\"},sizemin:{valType:\"number\",min:.1,max:2,dflt:.5,editType:\"calc\"},sizemax:{valType:\"number\",min:.1,dflt:20,editType:\"calc\"},border:{color:{valType:\"color\",arrayOk:!1,editType:\"calc\"},arearatio:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"},editType:\"calc\"},editType:\"calc\"},transforms:void 0}},{\"../scatter/attributes\":1187}],1174:[function(t,e,r){\"use strict\";var n=t(\"gl-pointcloud2d\"),i=t(\"../../lib/str2rgbarray\"),a=t(\"../../plots/cartesian/autorange\").findExtremes,o=t(\"../scatter/get_trace_color\");function s(t,e){this.scene=t,this.uid=e,this.type=\"pointcloud\",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color=\"rgb(0, 0, 0)\",this.name=\"\",this.hoverinfo=\"all\",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=n(t.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var l=s.prototype;l.handlePick=function(t){var e=this.idToIndex[t.pointId];return{trace:this,dataCoord:t.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*e],this.pickXYData[2*e+1]]:[this.pickXData[e],this.pickYData[e]],textLabel:Array.isArray(this.textLabels)?this.textLabels[e]:this.textLabels,color:this.color,name:this.name,pointIndex:e,hoverinfo:this.hoverinfo}},l.update=function(t){this.index=t.index,this.textLabels=t.text,this.name=t.name,this.hoverinfo=t.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(t),this.color=o(t,{})},l.updateFast=function(t){var e,r,n,o,s,l,c=this.xData=this.pickXData=t.x,u=this.yData=this.pickYData=t.y,f=this.pickXYData=t.xy,h=t.xbounds&&t.ybounds,p=t.indices,d=this.bounds;if(f){if(n=f,e=f.length>>>1,h)d[0]=t.xbounds[0],d[2]=t.xbounds[1],d[1]=t.ybounds[0],d[3]=t.ybounds[1];else for(l=0;ld[2]&&(d[2]=o),sd[3]&&(d[3]=s);if(p)r=p;else for(r=new Int32Array(e),l=0;ld[2]&&(d[2]=o),sd[3]&&(d[3]=s);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=n;var g=i(t.marker.color),m=i(t.marker.border.color),v=t.opacity*t.marker.opacity;g[3]*=v,this.pointcloudOptions.color=g;var y=t.marker.blend;if(null===y){y=c.length<100||u.length<100}this.pointcloudOptions.blend=y,m[3]*=v,this.pointcloudOptions.borderColor=m;var x=t.marker.sizemin,b=Math.max(t.marker.sizemax,t.marker.sizemin);this.pointcloudOptions.sizeMin=x,this.pointcloudOptions.sizeMax=b,this.pointcloudOptions.areaRatio=t.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var _=this.scene.xaxis,w=this.scene.yaxis,T=b/2||.5;t._extremes[_._id]=a(_,[d[0],d[2]],{ppad:T}),t._extremes[w._id]=a(w,[d[1],d[3]],{ppad:T})},l.dispose=function(){this.pointcloud.dispose()},e.exports=function(t,e){var r=new s(t,e.uid);return r.update(e),r}},{\"../../lib/str2rgbarray\":802,\"../../plots/cartesian/autorange\":827,\"../scatter/get_trace_color\":1197,\"gl-pointcloud2d\":324}],1175:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\");e.exports=function(t,e,r){function a(r,a){return n.coerce(t,e,i,r,a)}a(\"x\"),a(\"y\"),a(\"xbounds\"),a(\"ybounds\"),t.xy&&t.xy instanceof Float32Array&&(e.xy=t.xy),t.indices&&t.indices instanceof Int32Array&&(e.indices=t.indices),a(\"text\"),a(\"marker.color\",r),a(\"marker.opacity\"),a(\"marker.blend\"),a(\"marker.sizemin\"),a(\"marker.sizemax\"),a(\"marker.border.color\",r),a(\"marker.border.arearatio\"),e._length=null}},{\"../../lib\":778,\"./attributes\":1173}],1176:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"../scatter3d/calc\"),plot:t(\"./convert\"),moduleType:\"trace\",name:\"pointcloud\",basePlotModule:t(\"../../plots/gl2d\"),categories:[\"gl\",\"gl2d\",\"showLegend\"],meta:{}}},{\"../../plots/gl2d\":868,\"../scatter3d/calc\":1216,\"./attributes\":1173,\"./convert\":1174,\"./defaults\":1175}],1177:[function(t,e,r){\"use strict\";var n=t(\"../../plots/font_attributes\"),i=t(\"../../plots/attributes\"),a=t(\"../../components/color/attributes\"),o=t(\"../../components/fx/attributes\"),s=t(\"../../plots/domain\").attributes,l=t(\"../../plots/template_attributes\").hovertemplateAttrs,c=t(\"../../components/colorscale/attributes\"),u=t(\"../../plot_api/plot_template\").templatedArray,f=t(\"../../lib/extend\").extendFlat,h=t(\"../../plot_api/edit_types\").overrideAll;t(\"../../constants/docs\").FORMAT_LINK;(e.exports=h({hoverinfo:f({},i.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:o.hoverlabel,domain:s({name:\"sankey\",trace:!0}),orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],dflt:\"h\"},valueformat:{valType:\"string\",dflt:\".3s\"},valuesuffix:{valType:\"string\",dflt:\"\"},arrangement:{valType:\"enumerated\",values:[\"snap\",\"perpendicular\",\"freeform\",\"fixed\"],dflt:\"snap\"},textfont:n({}),customdata:void 0,node:{label:{valType:\"data_array\",dflt:[]},groups:{valType:\"info_array\",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:\"number\",editType:\"calc\"}},x:{valType:\"data_array\",dflt:[]},y:{valType:\"data_array\",dflt:[]},color:{valType:\"color\",arrayOk:!0},customdata:{valType:\"data_array\",editType:\"calc\"},line:{color:{valType:\"color\",dflt:a.defaultLine,arrayOk:!0},width:{valType:\"number\",min:0,dflt:.5,arrayOk:!0}},pad:{valType:\"number\",arrayOk:!1,min:0,dflt:20},thickness:{valType:\"number\",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:\"enumerated\",values:[\"all\",\"none\",\"skip\"],dflt:\"all\"},hoverlabel:o.hoverlabel,hovertemplate:l({},{keys:[\"value\",\"label\"]})},link:{label:{valType:\"data_array\",dflt:[]},color:{valType:\"color\",arrayOk:!0},customdata:{valType:\"data_array\",editType:\"calc\"},line:{color:{valType:\"color\",dflt:a.defaultLine,arrayOk:!0},width:{valType:\"number\",min:0,dflt:0,arrayOk:!0}},source:{valType:\"data_array\",dflt:[]},target:{valType:\"data_array\",dflt:[]},value:{valType:\"data_array\",dflt:[]},hoverinfo:{valType:\"enumerated\",values:[\"all\",\"none\",\"skip\"],dflt:\"all\"},hoverlabel:o.hoverlabel,hovertemplate:l({},{keys:[\"value\",\"label\"]}),colorscales:u(\"concentrationscales\",{editType:\"calc\",label:{valType:\"string\",editType:\"calc\",dflt:\"\"},cmax:{valType:\"number\",editType:\"calc\",dflt:1},cmin:{valType:\"number\",editType:\"calc\",dflt:0},colorscale:f(c().colorscale,{dflt:[[0,\"white\"],[1,\"black\"]]})})}},\"calc\",\"nested\")).transforms=void 0},{\"../../components/color/attributes\":642,\"../../components/colorscale/attributes\":650,\"../../components/fx/attributes\":674,\"../../constants/docs\":748,\"../../lib/extend\":768,\"../../plot_api/edit_types\":810,\"../../plot_api/plot_template\":817,\"../../plots/attributes\":824,\"../../plots/domain\":855,\"../../plots/font_attributes\":856,\"../../plots/template_attributes\":906}],1178:[function(t,e,r){\"use strict\";var n=t(\"../../plot_api/edit_types\").overrideAll,i=t(\"../../plots/get_data\").getModuleCalcData,a=t(\"./plot\"),o=t(\"../../components/fx/layout_attributes\"),s=t(\"../../lib/setcursor\"),l=t(\"../../components/dragelement\"),c=t(\"../../plots/cartesian/select\").prepSelect,u=t(\"../../lib\"),f=t(\"../../registry\");function h(t,e){var r=t._fullData[e],n=t._fullLayout,i=n.dragmode,a=\"pan\"===n.dragmode?\"move\":\"crosshair\",o=r._bgRect;if(\"pan\"!==i&&\"zoom\"!==i){s(o,a);var h={_id:\"x\",c2p:u.identity,_offset:r._sankey.translateX,_length:r._sankey.width},p={_id:\"y\",c2p:u.identity,_offset:r._sankey.translateY,_length:r._sankey.height},d={gd:t,element:o.node(),plotinfo:{id:e,xaxis:h,yaxis:p,fillRangeItems:u.noop},subplot:e,xaxes:[h],yaxes:[p],doneFnCompleted:function(r){var n,i=t._fullData[e],a=i.node.groups.slice(),o=[];function s(t){for(var e=i._sankey.graph.nodes,r=0;ry&&(y=a.source[e]),a.target[e]>y&&(y=a.target[e]);var x,b=y+1;t.node._count=b;var _=t.node.groups,w={};for(e=0;e<_.length;e++){var T=_[e];for(x=0;x0&&s(E,b)&&s(C,b)&&(!w.hasOwnProperty(E)||!w.hasOwnProperty(C)||w[E]!==w[C])){w.hasOwnProperty(C)&&(C=w[C]),w.hasOwnProperty(E)&&(E=w[E]),C=+C,h[E=+E]=h[C]=!0;var L=\"\";a.label&&a.label[e]&&(L=a.label[e]);var I=null;L&&p.hasOwnProperty(L)&&(I=p[L]),c.push({pointNumber:e,label:L,color:u?a.color[e]:a.color,customdata:f?a.customdata[e]:a.customdata,concentrationscale:I,source:E,target:C,value:+S}),A.source.push(E),A.target.push(C)}}var P=b+_.length,z=o(r.color),O=o(r.customdata),D=[];for(e=0;eb-1,childrenNodes:[],pointNumber:e,label:R,color:z?r.color[e]:r.color,customdata:O?r.customdata[e]:r.customdata})}var F=!1;return function(t,e,r){for(var a=i.init2dArray(t,0),o=0;o1}))}(P,A.source,A.target)&&(F=!0),{circular:F,links:c,nodes:D,groups:_,groupLookup:w}}e.exports=function(t,e){var r=c(e);return a({circular:r.circular,_nodes:r.nodes,_links:r.links,_groups:r.groups,_groupLookup:r.groupLookup})}},{\"../../components/colorscale\":655,\"../../lib\":778,\"../../lib/gup\":775,\"strongly-connected-components\":569}],1180:[function(t,e,r){\"use strict\";e.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:\"linear\",cn:{sankey:\"sankey\",sankeyLinks:\"sankey-links\",sankeyLink:\"sankey-link\",sankeyNodeSet:\"sankey-node-set\",sankeyNode:\"sankey-node\",nodeRect:\"node-rect\",nodeCapture:\"node-capture\",nodeCentered:\"node-entered\",nodeLabelGuide:\"node-label-guide\",nodeLabel:\"node-label\",nodeLabelTextPath:\"node-label-text-path\"}}},{}],1181:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"../../components/color\"),o=t(\"tinycolor2\"),s=t(\"../../plots/domain\").defaults,l=t(\"../../components/fx/hoverlabel_defaults\"),c=t(\"../../plot_api/plot_template\"),u=t(\"../../plots/array_container_defaults\");function f(t,e){function r(r,a){return n.coerce(t,e,i.link.colorscales,r,a)}r(\"label\"),r(\"cmin\"),r(\"cmax\"),r(\"colorscale\")}e.exports=function(t,e,r,h){function p(r,a){return n.coerce(t,e,i,r,a)}var d=n.extendDeep(h.hoverlabel,t.hoverlabel),g=t.node,m=c.newContainer(e,\"node\");function v(t,e){return n.coerce(g,m,i.node,t,e)}v(\"label\"),v(\"groups\"),v(\"x\"),v(\"y\"),v(\"pad\"),v(\"thickness\"),v(\"line.color\"),v(\"line.width\"),v(\"hoverinfo\",t.hoverinfo),l(g,m,v,d),v(\"hovertemplate\");var y=h.colorway;v(\"color\",m.label.map((function(t,e){return a.addOpacity(function(t){return y[t%y.length]}(e),.8)}))),v(\"customdata\");var x=t.link||{},b=c.newContainer(e,\"link\");function _(t,e){return n.coerce(x,b,i.link,t,e)}_(\"label\"),_(\"source\"),_(\"target\"),_(\"value\"),_(\"line.color\"),_(\"line.width\"),_(\"hoverinfo\",t.hoverinfo),l(x,b,_,d),_(\"hovertemplate\");var w,T=o(h.paper_bgcolor).getLuminance()<.333?\"rgba(255, 255, 255, 0.6)\":\"rgba(0, 0, 0, 0.2)\";_(\"color\",n.repeat(T,b.value.length)),_(\"customdata\"),u(x,b,{name:\"colorscales\",handleItemDefaults:f}),s(e,h,p),p(\"orientation\"),p(\"valueformat\"),p(\"valuesuffix\"),m.x.length&&m.y.length&&(w=\"freeform\"),p(\"arrangement\",w),n.coerceFont(p,\"textfont\",n.extendFlat({},h.font)),e._length=null}},{\"../../components/color\":643,\"../../components/fx/hoverlabel_defaults\":681,\"../../lib\":778,\"../../plot_api/plot_template\":817,\"../../plots/array_container_defaults\":823,\"../../plots/domain\":855,\"./attributes\":1177,tinycolor2:576}],1182:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),moduleType:\"trace\",name:\"sankey\",basePlotModule:t(\"./base_plot\"),selectPoints:t(\"./select.js\"),categories:[\"noOpacity\"],meta:{}}},{\"./attributes\":1177,\"./base_plot\":1178,\"./calc\":1179,\"./defaults\":1181,\"./plot\":1183,\"./select.js\":1185}],1183:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"./render\"),a=t(\"../../components/fx\"),o=t(\"../../components/color\"),s=t(\"../../lib\"),l=t(\"./constants\").cn,c=s._;function u(t){return\"\"!==t}function f(t,e){return t.filter((function(t){return t.key===e.traceId}))}function h(t,e){n.select(t).select(\"path\").style(\"fill-opacity\",e),n.select(t).select(\"rect\").style(\"fill-opacity\",e)}function p(t){n.select(t).select(\"text.name\").style(\"fill\",\"black\")}function d(t){return function(e){return-1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function g(t){return function(e){return-1!==e.node.sourceLinks.indexOf(t.link)||-1!==e.node.targetLinks.indexOf(t.link)}}function m(t,e,r){e&&r&&f(r,e).selectAll(\".\"+l.sankeyLink).filter(d(e)).call(y.bind(0,e,r,!1))}function v(t,e,r){e&&r&&f(r,e).selectAll(\".\"+l.sankeyLink).filter(d(e)).call(x.bind(0,e,r,!1))}function y(t,e,r,n){var i=n.datum().link.label;n.style(\"fill-opacity\",(function(t){if(!t.link.concentrationscale)return.4})),i&&f(e,t).selectAll(\".\"+l.sankeyLink).filter((function(t){return t.link.label===i})).style(\"fill-opacity\",(function(t){if(!t.link.concentrationscale)return.4})),r&&f(e,t).selectAll(\".\"+l.sankeyNode).filter(g(t)).call(m)}function x(t,e,r,n){var i=n.datum().link.label;n.style(\"fill-opacity\",(function(t){return t.tinyColorAlpha})),i&&f(e,t).selectAll(\".\"+l.sankeyLink).filter((function(t){return t.link.label===i})).style(\"fill-opacity\",(function(t){return t.tinyColorAlpha})),r&&f(e,t).selectAll(l.sankeyNode).filter(g(t)).call(v)}function b(t,e){var r=t.hoverlabel||{},n=s.nestedProperty(r,e).get();return!Array.isArray(n)&&n}e.exports=function(t,e){for(var r=t._fullLayout,s=r._paper,f=r._size,d=0;d\"),color:b(s,\"bgcolor\")||o.addOpacity(d.color,1),borderColor:b(s,\"bordercolor\"),fontFamily:b(s,\"font.family\"),fontSize:b(s,\"font.size\"),fontColor:b(s,\"font.color\"),nameLength:b(s,\"namelength\"),textAlign:b(s,\"align\"),idealAlign:n.event.x\"),color:b(o,\"bgcolor\")||i.tinyColorHue,borderColor:b(o,\"bordercolor\"),fontFamily:b(o,\"font.family\"),fontSize:b(o,\"font.size\"),fontColor:b(o,\"font.color\"),nameLength:b(o,\"namelength\"),textAlign:b(o,\"align\"),idealAlign:\"left\",hovertemplate:o.hovertemplate,hovertemplateLabels:v,eventData:[i.node]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t});h(_,.85),p(_)}}},unhover:function(e,i,o){!1!==t._fullLayout.hovermode&&(n.select(e).call(v,i,o),\"skip\"!==i.node.trace.node.hoverinfo&&(i.node.fullData=i.node.trace,t.emit(\"plotly_unhover\",{event:n.event,points:[i.node]})),a.loneUnhover(r._hoverlayer.node()))},select:function(e,r,i){var o=r.node;o.originalEvent=n.event,t._hoverdata=[o],n.select(e).call(v,r,i),a.click(t,{target:!0})}}})}},{\"../../components/color\":643,\"../../components/fx\":683,\"../../lib\":778,\"./constants\":1180,\"./render\":1184,d3:169}],1184:[function(t,e,r){\"use strict\";var n=t(\"./constants\"),i=t(\"d3\"),a=t(\"tinycolor2\"),o=t(\"../../components/color\"),s=t(\"../../components/drawing\"),l=t(\"@plotly/d3-sankey\"),c=t(\"@plotly/d3-sankey-circular\"),u=t(\"d3-force\"),f=t(\"../../lib\"),h=f.strTranslate,p=t(\"../../lib/gup\"),d=p.keyFun,g=p.repeat,m=p.unwrap,v=t(\"d3-interpolate\").interpolateNumber,y=t(\"../../registry\");function x(t,e,r){var i,o=m(e),s=o.trace,u=s.domain,h=\"h\"===s.orientation,p=s.node.pad,d=s.node.thickness,g=t.width*(u.x[1]-u.x[0]),v=t.height*(u.y[1]-u.y[0]),y=o._nodes,x=o._links,b=o.circular;(i=b?c.sankeyCircular().circularLinkGap(0):l.sankey()).iterations(n.sankeyIterations).size(h?[g,v]:[v,g]).nodeWidth(d).nodePadding(p).nodeId((function(t){return t.pointNumber})).nodes(y).links(x);var _,w,T,k=i();for(var M in i.nodePadding()=i||(r=i-e.y0)>1e-6&&(e.y0+=r,e.y1+=r),i=e.y1+p}))}(function(t){var e,r,n=t.map((function(t,e){return{x0:t.x0,index:e}})).sort((function(t,e){return t.x0-e.x0})),i=[],a=-1,o=-1/0;for(_=0;_o+d&&(a+=1,e=s.x0),o=s.x0,i[a]||(i[a]=[]),i[a].push(s),r=e-s.x0,s.x0+=r,s.x1+=r}return i}(y=k.nodes));i.update(k)}return{circular:b,key:r,trace:s,guid:f.randstr(),horizontal:h,width:g,height:v,nodePad:s.node.pad,nodeLineColor:s.node.line.color,nodeLineWidth:s.node.line.width,linkLineColor:s.link.line.color,linkLineWidth:s.link.line.width,valueFormat:s.valueformat,valueSuffix:s.valuesuffix,textFont:s.textfont,translateX:u.x[0]*t.width+t.margin.l,translateY:t.height-u.y[1]*t.height+t.margin.t,dragParallel:h?v:g,dragPerpendicular:h?g:v,arrangement:s.arrangement,sankey:i,graph:k,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function b(t,e,r){var n=a(e.color),i=e.source.label+\"|\"+e.target.label+\"__\"+r;return e.trace=t.trace,e.curveNumber=t.trace.index,{circular:t.circular,key:i,traceId:t.key,pointNumber:e.pointNumber,link:e,tinyColorHue:o.tinyRGB(n),tinyColorAlpha:n.getAlpha(),linkPath:_,linkLineColor:t.linkLineColor,linkLineWidth:t.linkLineWidth,valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,parent:t,interactionState:t.interactionState,flow:e.flow}}function _(){return function(t){if(t.link.circular)return e=t.link,r=e.width/2,n=e.circularPathData,\"top\"===e.circularLinkType?\"M \"+n.targetX+\" \"+(n.targetY+r)+\" L\"+n.rightInnerExtent+\" \"+(n.targetY+r)+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightSmallArcRadius+r)+\" 0 0 1 \"+(n.rightFullExtent-r)+\" \"+(n.targetY-n.rightSmallArcRadius)+\"L\"+(n.rightFullExtent-r)+\" \"+n.verticalRightInnerExtent+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightLargeArcRadius+r)+\" 0 0 1 \"+n.rightInnerExtent+\" \"+(n.verticalFullExtent-r)+\"L\"+n.leftInnerExtent+\" \"+(n.verticalFullExtent-r)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftLargeArcRadius+r)+\" 0 0 1 \"+(n.leftFullExtent+r)+\" \"+n.verticalLeftInnerExtent+\"L\"+(n.leftFullExtent+r)+\" \"+(n.sourceY-n.leftSmallArcRadius)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftSmallArcRadius+r)+\" 0 0 1 \"+n.leftInnerExtent+\" \"+(n.sourceY+r)+\"L\"+n.sourceX+\" \"+(n.sourceY+r)+\"L\"+n.sourceX+\" \"+(n.sourceY-r)+\"L\"+n.leftInnerExtent+\" \"+(n.sourceY-r)+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftSmallArcRadius-r)+\" 0 0 0 \"+(n.leftFullExtent-r)+\" \"+(n.sourceY-n.leftSmallArcRadius)+\"L\"+(n.leftFullExtent-r)+\" \"+n.verticalLeftInnerExtent+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftLargeArcRadius-r)+\" 0 0 0 \"+n.leftInnerExtent+\" \"+(n.verticalFullExtent+r)+\"L\"+n.rightInnerExtent+\" \"+(n.verticalFullExtent+r)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightLargeArcRadius-r)+\" 0 0 0 \"+(n.rightFullExtent+r)+\" \"+n.verticalRightInnerExtent+\"L\"+(n.rightFullExtent+r)+\" \"+(n.targetY-n.rightSmallArcRadius)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightSmallArcRadius-r)+\" 0 0 0 \"+n.rightInnerExtent+\" \"+(n.targetY-r)+\"L\"+n.targetX+\" \"+(n.targetY-r)+\"Z\":\"M \"+n.targetX+\" \"+(n.targetY-r)+\" L\"+n.rightInnerExtent+\" \"+(n.targetY-r)+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightSmallArcRadius+r)+\" 0 0 0 \"+(n.rightFullExtent-r)+\" \"+(n.targetY+n.rightSmallArcRadius)+\"L\"+(n.rightFullExtent-r)+\" \"+n.verticalRightInnerExtent+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightLargeArcRadius+r)+\" 0 0 0 \"+n.rightInnerExtent+\" \"+(n.verticalFullExtent+r)+\"L\"+n.leftInnerExtent+\" \"+(n.verticalFullExtent+r)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftLargeArcRadius+r)+\" 0 0 0 \"+(n.leftFullExtent+r)+\" \"+n.verticalLeftInnerExtent+\"L\"+(n.leftFullExtent+r)+\" \"+(n.sourceY+n.leftSmallArcRadius)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftSmallArcRadius+r)+\" 0 0 0 \"+n.leftInnerExtent+\" \"+(n.sourceY-r)+\"L\"+n.sourceX+\" \"+(n.sourceY-r)+\"L\"+n.sourceX+\" \"+(n.sourceY+r)+\"L\"+n.leftInnerExtent+\" \"+(n.sourceY+r)+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftSmallArcRadius-r)+\" 0 0 1 \"+(n.leftFullExtent-r)+\" \"+(n.sourceY+n.leftSmallArcRadius)+\"L\"+(n.leftFullExtent-r)+\" \"+n.verticalLeftInnerExtent+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftLargeArcRadius-r)+\" 0 0 1 \"+n.leftInnerExtent+\" \"+(n.verticalFullExtent-r)+\"L\"+n.rightInnerExtent+\" \"+(n.verticalFullExtent-r)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightLargeArcRadius-r)+\" 0 0 1 \"+(n.rightFullExtent+r)+\" \"+n.verticalRightInnerExtent+\"L\"+(n.rightFullExtent+r)+\" \"+(n.targetY+n.rightSmallArcRadius)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightSmallArcRadius-r)+\" 0 0 1 \"+n.rightInnerExtent+\" \"+(n.targetY+r)+\"L\"+n.targetX+\" \"+(n.targetY+r)+\"Z\";var e,r,n,i=t.link.source.x1,a=t.link.target.x0,o=v(i,a),s=o(.5),l=o(.5),c=t.link.y0-t.link.width/2,u=t.link.y0+t.link.width/2,f=t.link.y1-t.link.width/2,h=t.link.y1+t.link.width/2;return\"M\"+i+\",\"+c+\"C\"+s+\",\"+c+\" \"+l+\",\"+f+\" \"+a+\",\"+f+\"L\"+a+\",\"+h+\"C\"+l+\",\"+h+\" \"+s+\",\"+u+\" \"+i+\",\"+u+\"Z\"}}function w(t,e){var r=a(e.color),i=n.nodePadAcross,s=t.nodePad/2;e.dx=e.x1-e.x0,e.dy=e.y1-e.y0;var l=e.dx,c=Math.max(.5,e.dy),u=\"node_\"+e.pointNumber;return e.group&&(u=f.randstr()),e.trace=t.trace,e.curveNumber=t.trace.index,{index:e.pointNumber,key:u,partOfGroup:e.partOfGroup||!1,group:e.group,traceId:t.key,trace:t.trace,node:e,nodePad:t.nodePad,nodeLineColor:t.nodeLineColor,nodeLineWidth:t.nodeLineWidth,textFont:t.textFont,size:t.horizontal?t.height:t.width,visibleWidth:Math.ceil(l),visibleHeight:c,zoneX:-i,zoneY:-s,zoneWidth:l+2*i,zoneHeight:c+2*s,labelY:t.horizontal?e.dy/2+1:e.dx/2+1,left:1===e.originalLayer,sizeAcross:t.width,forceLayouts:t.forceLayouts,horizontal:t.horizontal,darkBackground:r.getBrightness()<=128,tinyColorHue:o.tinyRGB(r),tinyColorAlpha:r.getAlpha(),valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,graph:t.graph,arrangement:t.arrangement,uniqueNodeLabelPathId:[t.guid,t.key,u].join(\"_\"),interactionState:t.interactionState,figure:t}}function T(t){t.attr(\"transform\",(function(t){return h(t.node.x0.toFixed(3),t.node.y0.toFixed(3))}))}function k(t){t.call(T)}function M(t,e){t.call(k),e.attr(\"d\",_())}function A(t){t.attr(\"width\",(function(t){return t.node.x1-t.node.x0})).attr(\"height\",(function(t){return t.visibleHeight}))}function S(t){return t.link.width>1||t.linkLineWidth>0}function E(t){return h(t.translateX,t.translateY)+(t.horizontal?\"matrix(1 0 0 1 0 0)\":\"matrix(0 1 1 0 0 0)\")}function C(t){return h(t.horizontal?0:t.labelY,t.horizontal?t.labelY:0)}function L(t){return i.svg.line()([[t.horizontal?t.left?-t.sizeAcross:t.visibleWidth+n.nodeTextOffsetHorizontal:n.nodeTextOffsetHorizontal,0],[t.horizontal?t.left?-n.nodeTextOffsetHorizontal:t.sizeAcross:t.visibleHeight-n.nodeTextOffsetHorizontal,0]])}function I(t){return t.horizontal?\"matrix(1 0 0 1 0 0)\":\"matrix(0 1 1 0 0 0)\"}function P(t){return t.horizontal?\"scale(1 1)\":\"scale(-1 1)\"}function z(t){return t.darkBackground&&!t.horizontal?\"rgb(255,255,255)\":\"rgb(0,0,0)\"}function O(t){return t.horizontal&&t.left?\"100%\":\"0%\"}function D(t,e,r){t.on(\".basic\",null).on(\"mouseover.basic\",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.hover(this,t,e),t.interactionState.hovered=[this,t])})).on(\"mousemove.basic\",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.follow(this,t),t.interactionState.hovered=[this,t])})).on(\"mouseout.basic\",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.unhover(this,t,e),t.interactionState.hovered=!1)})).on(\"click.basic\",(function(t){t.interactionState.hovered&&(r.unhover(this,t,e),t.interactionState.hovered=!1),t.interactionState.dragInProgress||t.partOfGroup||r.select(this,t,e)}))}function R(t,e,r,a){var o=i.behavior.drag().origin((function(t){return{x:t.node.x0+t.visibleWidth/2,y:t.node.y0+t.visibleHeight/2}})).on(\"dragstart\",(function(i){if(\"fixed\"!==i.arrangement&&(f.ensureSingle(a._fullLayout._infolayer,\"g\",\"dragcover\",(function(t){a._fullLayout._dragCover=t})),f.raiseToTop(this),i.interactionState.dragInProgress=i.node,B(i.node),i.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,i.interactionState.hovered),i.interactionState.hovered=!1),\"snap\"===i.arrangement)){var o=i.traceId+\"|\"+i.key;i.forceLayouts[o]?i.forceLayouts[o].alpha(1):function(t,e,r,i){!function(t){for(var e=0;e0&&i.forceLayouts[e].alpha(0)}}(0,e,a,r)).stop()}(0,o,i),function(t,e,r,i,a){window.requestAnimationFrame((function o(){var s;for(s=0;s0)window.requestAnimationFrame(o);else{var l=r.node.originalX;r.node.x0=l-r.visibleWidth/2,r.node.x1=l+r.visibleWidth/2,F(r,a)}}))}(t,e,i,o,a)}})).on(\"drag\",(function(r){if(\"fixed\"!==r.arrangement){var n=i.event.x,a=i.event.y;\"snap\"===r.arrangement?(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2,r.node.y0=a-r.visibleHeight/2,r.node.y1=a+r.visibleHeight/2):(\"freeform\"===r.arrangement&&(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2),a=Math.max(0,Math.min(r.size-r.visibleHeight/2,a)),r.node.y0=a-r.visibleHeight/2,r.node.y1=a+r.visibleHeight/2),B(r.node),\"snap\"!==r.arrangement&&(r.sankey.update(r.graph),M(t.filter(N(r)),e))}})).on(\"dragend\",(function(t){if(\"fixed\"!==t.arrangement){t.interactionState.dragInProgress=!1;for(var e=0;e5?t.node.label:\"\"})).attr(\"text-anchor\",(function(t){return t.horizontal&&t.left?\"end\":\"start\"})),q.transition().ease(n.ease).duration(n.duration).attr(\"startOffset\",O).style(\"fill\",z)}},{\"../../components/color\":643,\"../../components/drawing\":665,\"../../lib\":778,\"../../lib/gup\":775,\"../../registry\":911,\"./constants\":1180,\"@plotly/d3-sankey\":56,\"@plotly/d3-sankey-circular\":55,d3:169,\"d3-force\":160,\"d3-interpolate\":162,tinycolor2:576}],1185:[function(t,e,r){\"use strict\";e.exports=function(t,e){for(var r=[],n=t.cd[0].trace,i=n._sankey.graph.nodes,a=0;al&&E[v].gap;)v--;for(x=E[v].s,g=E.length-1;g>v;g--)E[g].s=x;for(;lA[u]&&u=0;i--){var a=t[i];if(\"scatter\"===a.type&&a.xaxis===r.xaxis&&a.yaxis===r.yaxis){a.opacity=void 0;break}}}}}},{}],1194:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../registry\"),a=t(\"./attributes\"),o=t(\"./constants\"),s=t(\"./subtypes\"),l=t(\"./xy_defaults\"),c=t(\"./period_defaults\"),u=t(\"./stack_defaults\"),f=t(\"./marker_defaults\"),h=t(\"./line_defaults\"),p=t(\"./line_shape_defaults\"),d=t(\"./text_defaults\"),g=t(\"./fillcolor_defaults\");e.exports=function(t,e,r,m){function v(r,i){return n.coerce(t,e,a,r,i)}var y=l(t,e,m,v);if(y||(e.visible=!1),e.visible){c(t,e,m,v);var x=u(t,e,m,v),b=!x&&yG!=(F=P[L][1])>=G&&(O=P[L-1][0],D=P[L][0],F-R&&(z=O+(D-O)*(G-R)/(F-R),U=Math.min(U,z),V=Math.max(V,z)));U=Math.max(U,0),V=Math.min(V,h._length);var Y=s.defaultLine;return s.opacity(f.fillcolor)?Y=f.fillcolor:s.opacity((f.line||{}).color)&&(Y=f.line.color),n.extendFlat(t,{distance:t.maxHoverDistance,x0:U,x1:V,y0:G,y1:G,color:Y,hovertemplate:!1}),delete t.index,f.text&&!Array.isArray(f.text)?t.text=String(f.text):t.text=f.name,[t]}}}},{\"../../components/color\":643,\"../../components/fx\":683,\"../../lib\":778,\"../../registry\":911,\"./get_trace_color\":1197}],1199:[function(t,e,r){\"use strict\";var n=t(\"./subtypes\");e.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),crossTraceDefaults:t(\"./cross_trace_defaults\"),calc:t(\"./calc\").calc,crossTraceCalc:t(\"./cross_trace_calc\"),arraysToCalcdata:t(\"./arrays_to_calcdata\"),plot:t(\"./plot\"),colorbar:t(\"./marker_colorbar\"),formatLabels:t(\"./format_labels\"),style:t(\"./style\").style,styleOnSelect:t(\"./style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"./select\"),animatable:!0,moduleType:\"trace\",name:\"scatter\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"symbols\",\"errorBarsOK\",\"showLegend\",\"scatter-like\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":841,\"./arrays_to_calcdata\":1186,\"./attributes\":1187,\"./calc\":1188,\"./cross_trace_calc\":1192,\"./cross_trace_defaults\":1193,\"./defaults\":1194,\"./format_labels\":1196,\"./hover\":1198,\"./marker_colorbar\":1205,\"./plot\":1208,\"./select\":1209,\"./style\":1211,\"./subtypes\":1212}],1200:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isArrayOrTypedArray,i=t(\"../../components/colorscale/helpers\").hasColorscale,a=t(\"../../components/colorscale/defaults\");e.exports=function(t,e,r,o,s,l){var c=(t.marker||{}).color;(s(\"line.color\",r),i(t,\"line\"))?a(t,e,o,s,{prefix:\"line.\",cLetter:\"c\"}):s(\"line.color\",!n(c)&&c||r);s(\"line.width\"),(l||{}).noDash||s(\"line.dash\")}},{\"../../components/colorscale/defaults\":653,\"../../components/colorscale/helpers\":654,\"../../lib\":778}],1201:[function(t,e,r){\"use strict\";var n=t(\"../../constants/numerical\"),i=n.BADNUM,a=n.LOG_CLIP,o=a+.5,s=a-.5,l=t(\"../../lib\"),c=l.segmentsIntersect,u=l.constrain,f=t(\"./constants\");e.exports=function(t,e){var r,n,a,h,p,d,g,m,v,y,x,b,_,w,T,k,M,A,S=e.xaxis,E=e.yaxis,C=\"log\"===S.type,L=\"log\"===E.type,I=S._length,P=E._length,z=e.connectGaps,O=e.baseTolerance,D=e.shape,R=\"linear\"===D,F=e.fill&&\"none\"!==e.fill,B=[],N=f.minTolerance,j=t.length,U=new Array(j),V=0;function q(r){var n=t[r];if(!n)return!1;var a=e.linearized?S.l2p(n.x):S.c2p(n.x),l=e.linearized?E.l2p(n.y):E.c2p(n.y);if(a===i){if(C&&(a=S.c2p(n.x,!0)),a===i)return!1;L&&l===i&&(a*=Math.abs(S._m*P*(S._m>0?o:s)/(E._m*I*(E._m>0?o:s)))),a*=1e3}if(l===i){if(L&&(l=E.c2p(n.y,!0)),l===i)return!1;l*=1e3}return[a,l]}function H(t,e,r,n){var i=r-t,a=n-e,o=.5-t,s=.5-e,l=i*i+a*a,c=i*o+a*s;if(c>0&&crt||t[1]it)return[u(t[0],et,rt),u(t[1],nt,it)]}function st(t,e){return t[0]===e[0]&&(t[0]===et||t[0]===rt)||(t[1]===e[1]&&(t[1]===nt||t[1]===it)||void 0)}function lt(t,e,r){return function(n,i){var a=ot(n),o=ot(i),s=[];if(a&&o&&st(a,o))return s;a&&s.push(a),o&&s.push(o);var c=2*l.constrain((n[t]+i[t])/2,e,r)-((a||n)[t]+(o||i)[t]);c&&((a&&o?c>0==a[t]>o[t]?a:o:a||o)[t]+=c);return s}}function ct(t){var e=t[0],r=t[1],n=e===U[V-1][0],i=r===U[V-1][1];if(!n||!i)if(V>1){var a=e===U[V-2][0],o=r===U[V-2][1];n&&(e===et||e===rt)&&a?o?V--:U[V-1]=t:i&&(r===nt||r===it)&&o?a?V--:U[V-1]=t:U[V++]=t}else U[V++]=t}function ut(t){U[V-1][0]!==t[0]&&U[V-1][1]!==t[1]&&ct([Z,J]),ct(t),K=null,Z=J=0}function ft(t){if(M=t[0]/I,A=t[1]/P,W=t[0]rt?rt:0,X=t[1]it?it:0,W||X){if(V)if(K){var e=$(K,t);e.length>1&&(ut(e[0]),U[V++]=e[1])}else Q=$(U[V-1],t)[0],U[V++]=Q;else U[V++]=[W||t[0],X||t[1]];var r=U[V-1];W&&X&&(r[0]!==W||r[1]!==X)?(K&&(Z!==W&&J!==X?ct(Z&&J?(n=K,a=(i=t)[0]-n[0],o=(i[1]-n[1])/a,(n[1]*i[0]-i[1]*n[0])/a>0?[o>0?et:rt,it]:[o>0?rt:et,nt]):[Z||W,J||X]):Z&&J&&ct([Z,J])),ct([W,X])):Z-W&&J-X&&ct([W||Z,X||J]),K=t,Z=W,J=X}else K&&ut($(K,t)[0]),U[V++]=t;var n,i,a,o}for(\"linear\"===D||\"spline\"===D?$=function(t,e){for(var r=[],n=0,i=0;i<4;i++){var a=at[i],o=c(t[0],t[1],e[0],e[1],a[0],a[1],a[2],a[3]);o&&(!n||Math.abs(o.x-r[0][0])>1||Math.abs(o.y-r[0][1])>1)&&(o=[o.x,o.y],n&&Y(o,t)G(d,ht))break;a=d,(_=v[0]*m[0]+v[1]*m[1])>x?(x=_,h=d,g=!1):_=t.length||!d)break;ft(d),n=d}}else ft(h)}K&&ct([Z||K[0],J||K[1]]),B.push(U.slice(0,V))}return B}},{\"../../constants/numerical\":753,\"../../lib\":778,\"./constants\":1191}],1202:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){\"spline\"===r(\"line.shape\")&&r(\"line.smoothing\")}},{}],1203:[function(t,e,r){\"use strict\";var n={tonextx:1,tonexty:1,tonext:1};e.exports=function(t,e,r){var i,a,o,s,l,c={},u=!1,f=-1,h=0,p=-1;for(a=0;a=0?l=p:(l=p=h,h++),l0?Math.max(e,i):0}}},{\"fast-isnumeric\":241}],1205:[function(t,e,r){\"use strict\";e.exports={container:\"marker\",min:\"cmin\",max:\"cmax\"}},{}],1206:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"../../components/colorscale/helpers\").hasColorscale,a=t(\"../../components/colorscale/defaults\"),o=t(\"./subtypes\");e.exports=function(t,e,r,s,l,c){var u=o.isBubble(t),f=(t.line||{}).color;(c=c||{},f&&(r=f),l(\"marker.symbol\"),l(\"marker.opacity\",u?.7:1),l(\"marker.size\"),l(\"marker.color\",r),i(t,\"marker\")&&a(t,e,s,l,{prefix:\"marker.\",cLetter:\"c\"}),c.noSelect||(l(\"selected.marker.color\"),l(\"unselected.marker.color\"),l(\"selected.marker.size\"),l(\"unselected.marker.size\")),c.noLine||(l(\"marker.line.color\",f&&!Array.isArray(f)&&e.marker.color!==f?f:u?n.background:n.defaultLine),i(t,\"marker.line\")&&a(t,e,s,l,{prefix:\"marker.line.\",cLetter:\"c\"}),l(\"marker.line.width\",u?1:0)),u&&(l(\"marker.sizeref\"),l(\"marker.sizemin\"),l(\"marker.sizemode\")),c.gradient)&&(\"none\"!==l(\"marker.gradient.type\")&&l(\"marker.gradient.color\"))}},{\"../../components/color\":643,\"../../components/colorscale/defaults\":653,\"../../components/colorscale/helpers\":654,\"./subtypes\":1212}],1207:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").dateTick0,i=t(\"../../constants/numerical\").ONEWEEK;function a(t,e){return n(e,t%i==0?1:0)}e.exports=function(t,e,r,n,i){if(i||(i={x:!0,y:!0}),i.x){var o=n(\"xperiod\");o&&(n(\"xperiod0\",a(o,e.xcalendar)),n(\"xperiodalignment\"))}if(i.y){var s=n(\"yperiod\");s&&(n(\"yperiod0\",a(s,e.ycalendar)),n(\"yperiodalignment\"))}}},{\"../../constants/numerical\":753,\"../../lib\":778}],1208:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../registry\"),a=t(\"../../lib\"),o=a.ensureSingle,s=a.identity,l=t(\"../../components/drawing\"),c=t(\"./subtypes\"),u=t(\"./line_points\"),f=t(\"./link_traces\"),h=t(\"../../lib/polygon\").tester;function p(t,e,r,f,p,d,g){var m;!function(t,e,r,i,o){var s=r.xaxis,l=r.yaxis,u=n.extent(a.simpleMap(s.range,s.r2c)),f=n.extent(a.simpleMap(l.range,l.r2c)),h=i[0].trace;if(!c.hasMarkers(h))return;var p=h.marker.maxdisplayed;if(0===p)return;var d=i.filter((function(t){return t.x>=u[0]&&t.x<=u[1]&&t.y>=f[0]&&t.y<=f[1]})),g=Math.ceil(d.length/p),m=0;o.forEach((function(t,r){var n=t[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function y(t){return v?t.transition():t}var x=r.xaxis,b=r.yaxis,_=f[0].trace,w=_.line,T=n.select(d),k=o(T,\"g\",\"errorbars\"),M=o(T,\"g\",\"lines\"),A=o(T,\"g\",\"points\"),S=o(T,\"g\",\"text\");if(i.getComponentMethod(\"errorbars\",\"plot\")(t,k,r,g),!0===_.visible){var E,C;y(T).style(\"opacity\",_.opacity);var L=_.fill.charAt(_.fill.length-1);\"x\"!==L&&\"y\"!==L&&(L=\"\"),f[0][r.isRangePlot?\"nodeRangePlot3\":\"node3\"]=T;var I,P,z=\"\",O=[],D=_._prevtrace;D&&(z=D._prevRevpath||\"\",C=D._nextFill,O=D._polygons);var R,F,B,N,j,U,V,q=\"\",H=\"\",G=[],Y=a.noop;if(E=_._ownFill,c.hasLines(_)||\"none\"!==_.fill){for(C&&C.datum(f),-1!==[\"hv\",\"vh\",\"hvh\",\"vhv\"].indexOf(w.shape)?(R=l.steps(w.shape),F=l.steps(w.shape.split(\"\").reverse().join(\"\"))):R=F=\"spline\"===w.shape?function(t){var e=t[t.length-1];return t.length>1&&t[0][0]===e[0]&&t[0][1]===e[1]?l.smoothclosed(t.slice(1),w.smoothing):l.smoothopen(t,w.smoothing)}:function(t){return\"M\"+t.join(\"L\")},B=function(t){return F(t.reverse())},G=u(f,{xaxis:x,yaxis:b,connectGaps:_.connectgaps,baseTolerance:Math.max(w.width||1,3)/4,shape:w.shape,simplify:w.simplify,fill:_.fill}),V=_._polygons=new Array(G.length),m=0;m1){var r=n.select(this);if(r.datum(f),t)y(r.style(\"opacity\",0).attr(\"d\",I).call(l.lineGroupStyle)).style(\"opacity\",1);else{var i=y(r);i.attr(\"d\",I),l.singleLineStyle(f,i)}}}}}var W=M.selectAll(\".js-line\").data(G);y(W.exit()).style(\"opacity\",0).remove(),W.each(Y(!1)),W.enter().append(\"path\").classed(\"js-line\",!0).style(\"vector-effect\",\"non-scaling-stroke\").call(l.lineGroupStyle).each(Y(!0)),l.setClipUrl(W,r.layerClipId,t),G.length?(E?(E.datum(f),N&&U&&(L?(\"y\"===L?N[1]=U[1]=b.c2p(0,!0):\"x\"===L&&(N[0]=U[0]=x.c2p(0,!0)),y(E).attr(\"d\",\"M\"+U+\"L\"+N+\"L\"+q.substr(1)).call(l.singleFillStyle)):y(E).attr(\"d\",q+\"Z\").call(l.singleFillStyle))):C&&(\"tonext\"===_.fill.substr(0,6)&&q&&z?(\"tonext\"===_.fill?y(C).attr(\"d\",q+\"Z\"+z+\"Z\").call(l.singleFillStyle):y(C).attr(\"d\",q+\"L\"+z.substr(1)+\"Z\").call(l.singleFillStyle),_._polygons=_._polygons.concat(O)):(Z(C),_._polygons=null)),_._prevRevpath=H,_._prevPolygons=V):(E?Z(E):C&&Z(C),_._polygons=_._prevRevpath=_._prevPolygons=null),A.datum(f),S.datum(f),function(e,i,a){var o,u=a[0].trace,f=c.hasMarkers(u),h=c.hasText(u),p=tt(u),d=et,g=et;if(f||h){var m=s,_=u.stackgroup,w=_&&\"infer zero\"===t._fullLayout._scatterStackOpts[x._id+b._id][_].stackgaps;u.marker.maxdisplayed||u._needsCull?m=w?K:J:_&&!w&&(m=Q),f&&(d=m),h&&(g=m)}var T,k=(o=e.selectAll(\"path.point\").data(d,p)).enter().append(\"path\").classed(\"point\",!0);v&&k.call(l.pointStyle,u,t).call(l.translatePoints,x,b).style(\"opacity\",0).transition().style(\"opacity\",1),o.order(),f&&(T=l.makePointStyleFns(u)),o.each((function(e){var i=n.select(this),a=y(i);l.translatePoint(e,a,x,b)?(l.singlePointStyle(e,a,u,T,t),r.layerClipId&&l.hideOutsideRangePoint(e,a,x,b,u.xcalendar,u.ycalendar),u.customdata&&i.classed(\"plotly-customdata\",null!==e.data&&void 0!==e.data)):a.remove()})),v?o.exit().transition().style(\"opacity\",0).remove():o.exit().remove(),(o=i.selectAll(\"g\").data(g,p)).enter().append(\"g\").classed(\"textpoint\",!0).append(\"text\"),o.order(),o.each((function(t){var e=n.select(this),i=y(e.select(\"text\"));l.translatePoint(t,i,x,b)?r.layerClipId&&l.hideOutsideRangePoint(t,e,x,b,u.xcalendar,u.ycalendar):e.remove()})),o.selectAll(\"text\").call(l.textPointStyle,u,t).each((function(t){var e=x.c2p(t.x),r=b.c2p(t.y);n.select(this).selectAll(\"tspan.line\").each((function(){y(n.select(this)).attr({x:e,y:r})}))})),o.exit().remove()}(A,S,f);var X=!1===_.cliponaxis?null:r.layerClipId;l.setClipUrl(A,X,t),l.setClipUrl(S,X,t)}function Z(t){y(t).attr(\"d\",\"M0,0Z\")}function J(t){return t.filter((function(t){return!t.gap&&t.vis}))}function K(t){return t.filter((function(t){return t.vis}))}function Q(t){return t.filter((function(t){return!t.gap}))}function $(t){return t.id}function tt(t){if(t.ids)return $}function et(){return!1}}e.exports=function(t,e,r,i,a,c){var u,h,d=!a,g=!!a&&a.duration>0,m=f(t,e,r);((u=i.selectAll(\"g.trace\").data(m,(function(t){return t[0].trace.uid}))).enter().append(\"g\").attr(\"class\",(function(t){return\"trace scatter trace\"+t[0].trace.uid})).style(\"stroke-miterlimit\",2),u.order(),function(t,e,r){e.each((function(e){var i=o(n.select(this),\"g\",\"fills\");l.setClipUrl(i,r.layerClipId,t);var a=e[0].trace,c=[];a._ownfill&&c.push(\"_ownFill\"),a._nexttrace&&c.push(\"_nextFill\");var u=i.selectAll(\"g\").data(c,s);u.enter().append(\"g\"),u.exit().each((function(t){a[t]=null})).remove(),u.order().each((function(t){a[t]=o(n.select(this),\"path\",\"js-fill\")}))}))}(t,u,e),g)?(c&&(h=c()),n.transition().duration(a.duration).ease(a.easing).each(\"end\",(function(){h&&h()})).each(\"interrupt\",(function(){h&&h()})).each((function(){i.selectAll(\"g.trace\").each((function(r,n){p(t,n,e,r,m,this,a)}))}))):u.each((function(r,n){p(t,n,e,r,m,this,a)}));d&&u.exit().remove(),i.selectAll(\"path:not([d])\").remove()}},{\"../../components/drawing\":665,\"../../lib\":778,\"../../lib/polygon\":790,\"../../registry\":911,\"./line_points\":1201,\"./link_traces\":1203,\"./subtypes\":1212,d3:169}],1209:[function(t,e,r){\"use strict\";var n=t(\"./subtypes\");e.exports=function(t,e){var r,i,a,o,s=t.cd,l=t.xaxis,c=t.yaxis,u=[],f=s[0].trace;if(!n.hasMarkers(f)&&!n.hasText(f))return[];if(!1===e)for(r=0;r0){var h=i.c2l(u);i._lowerLogErrorBound||(i._lowerLogErrorBound=h),i._lowerErrorBound=Math.min(i._lowerLogErrorBound,h)}}else o[s]=[-l[0]*r,l[1]*r]}return o}e.exports=function(t,e,r){var n=[i(t.x,t.error_x,e[0],r.xaxis),i(t.y,t.error_y,e[1],r.yaxis),i(t.z,t.error_z,e[2],r.zaxis)],a=function(t){for(var e=0;e-1?-1:t.indexOf(\"right\")>-1?1:0}function b(t){return null==t?0:t.indexOf(\"top\")>-1?-1:t.indexOf(\"bottom\")>-1?1:0}function _(t,e){return e(4*t)}function w(t){return p[t]}function T(t,e,r,n,i){var a=null;if(l.isArrayOrTypedArray(t)){a=[];for(var o=0;o=0){var g=function(t,e,r){var n,i=(r+1)%3,a=(r+2)%3,o=[],l=[];for(n=0;n=0&&f(\"surfacecolor\",h||p);for(var d=[\"x\",\"y\",\"z\"],g=0;g<3;++g){var m=\"projection.\"+d[g];f(m+\".show\")&&(f(m+\".opacity\"),f(m+\".scale\"))}var v=n.getComponentMethod(\"errorbars\",\"supplyDefaults\");v(t,e,h||p||r,{axis:\"z\"}),v(t,e,h||p||r,{axis:\"y\",inherit:\"z\"}),v(t,e,h||p||r,{axis:\"x\",inherit:\"z\"})}else e.visible=!1}},{\"../../lib\":778,\"../../registry\":911,\"../scatter/line_defaults\":1200,\"../scatter/marker_defaults\":1206,\"../scatter/subtypes\":1212,\"../scatter/text_defaults\":1213,\"./attributes\":1215}],1220:[function(t,e,r){\"use strict\";e.exports={plot:t(\"./convert\"),attributes:t(\"./attributes\"),markerSymbols:t(\"../../constants/gl3d_markers\"),supplyDefaults:t(\"./defaults\"),colorbar:[{container:\"marker\",min:\"cmin\",max:\"cmax\"},{container:\"line\",min:\"cmin\",max:\"cmax\"}],calc:t(\"./calc\"),moduleType:\"trace\",name:\"scatter3d\",basePlotModule:t(\"../../plots/gl3d\"),categories:[\"gl3d\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../constants/gl3d_markers\":751,\"../../plots/gl3d\":870,\"./attributes\":1215,\"./calc\":1216,\"./convert\":1218,\"./defaults\":1219}],1221:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../plots/attributes\"),a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../../plots/template_attributes\").texttemplateAttrs,s=t(\"../../components/colorscale/attributes\"),l=t(\"../../lib/extend\").extendFlat,c=n.marker,u=n.line,f=c.line;e.exports={carpet:{valType:\"string\",editType:\"calc\"},a:{valType:\"data_array\",editType:\"calc\"},b:{valType:\"data_array\",editType:\"calc\"},mode:l({},n.mode,{dflt:\"markers\"}),text:l({},n.text,{}),texttemplate:o({editType:\"plot\"},{keys:[\"a\",\"b\",\"text\"]}),hovertext:l({},n.hovertext,{}),line:{color:u.color,width:u.width,dash:u.dash,shape:l({},u.shape,{values:[\"linear\",\"spline\"]}),smoothing:u.smoothing,editType:\"calc\"},connectgaps:n.connectgaps,fill:l({},n.fill,{values:[\"none\",\"toself\",\"tonext\"],dflt:\"none\"}),fillcolor:n.fillcolor,marker:l({symbol:c.symbol,opacity:c.opacity,maxdisplayed:c.maxdisplayed,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,line:l({width:f.width,editType:\"calc\"},s(\"marker.line\")),gradient:c.gradient,editType:\"calc\"},s(\"marker\")),textfont:n.textfont,textposition:n.textposition,selected:n.selected,unselected:n.unselected,hoverinfo:l({},i.hoverinfo,{flags:[\"a\",\"b\",\"text\",\"name\"]}),hoveron:n.hoveron,hovertemplate:a()}},{\"../../components/colorscale/attributes\":650,\"../../lib/extend\":768,\"../../plots/attributes\":824,\"../../plots/template_attributes\":906,\"../scatter/attributes\":1187}],1222:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../scatter/colorscale_calc\"),a=t(\"../scatter/arrays_to_calcdata\"),o=t(\"../scatter/calc_selection\"),s=t(\"../scatter/calc\").calcMarkerSize,l=t(\"../carpet/lookup_carpetid\");e.exports=function(t,e){var r=e._carpetTrace=l(t,e);if(r&&r.visible&&\"legendonly\"!==r.visible){var c;e.xaxis=r.xaxis,e.yaxis=r.yaxis;var u,f,h=e._length,p=new Array(h),d=!1;for(c=0;c\")}return o}function y(t,e){var r;r=t.labelprefix&&t.labelprefix.length>0?t.labelprefix.replace(/ = $/,\"\"):t._hovertitle,m.push(r+\": \"+e.toFixed(3)+t.labelsuffix)}}},{\"../../lib\":778,\"../scatter/hover\":1198}],1227:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"../scatter/select\"),eventData:t(\"./event_data\"),moduleType:\"trace\",name:\"scattercarpet\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"svg\",\"carpet\",\"symbols\",\"showLegend\",\"carpetDependent\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":841,\"../scatter/marker_colorbar\":1205,\"../scatter/select\":1209,\"../scatter/style\":1211,\"./attributes\":1221,\"./calc\":1222,\"./defaults\":1223,\"./event_data\":1224,\"./format_labels\":1225,\"./hover\":1226,\"./plot\":1228}],1228:[function(t,e,r){\"use strict\";var n=t(\"../scatter/plot\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../../components/drawing\");e.exports=function(t,e,r,o){var s,l,c,u=r[0][0].carpet,f={xaxis:i.getFromId(t,u.xaxis||\"x\"),yaxis:i.getFromId(t,u.yaxis||\"y\"),plot:e.plot};for(n(t,f,r,o),s=0;s\")}(c,g,t,l[0].t.labels),t.hovertemplate=c.hovertemplate,[t]}}},{\"../../components/fx\":683,\"../../constants/numerical\":753,\"../../lib\":778,\"../scatter/get_trace_color\":1197,\"./attributes\":1229}],1235:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),calcGeoJSON:t(\"./plot\").calcGeoJSON,plot:t(\"./plot\").plot,style:t(\"./style\"),styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),moduleType:\"trace\",name:\"scattergeo\",basePlotModule:t(\"../../plots/geo\"),categories:[\"geo\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../plots/geo\":860,\"../scatter/marker_colorbar\":1205,\"../scatter/style\":1211,\"./attributes\":1229,\"./calc\":1230,\"./defaults\":1231,\"./event_data\":1232,\"./format_labels\":1233,\"./hover\":1234,\"./plot\":1236,\"./select\":1237,\"./style\":1238}],1236:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../lib\"),a=t(\"../../lib/topojson_utils\").getTopojsonFeatures,o=t(\"../../lib/geojson_utils\"),s=t(\"../../lib/geo_location_utils\"),l=t(\"../../plots/cartesian/autorange\").findExtremes,c=t(\"../../constants/numerical\").BADNUM,u=t(\"../scatter/calc\").calcMarkerSize,f=t(\"../scatter/subtypes\"),h=t(\"./style\");e.exports={calcGeoJSON:function(t,e){var r,n,i=t[0].trace,o=e[i.geo],f=o._subplot,h=i._length;if(Array.isArray(i.locations)){var p=i.locationmode,d=\"geojson-id\"===p?s.extractTraceFeature(t):a(i,f.topojson);for(r=0;r=m,k=2*w,M={},A=x.makeCalcdata(e,\"x\"),S=b.makeCalcdata(e,\"y\"),E=s(e,x,\"x\",A),C=s(e,b,\"y\",S);e._x=E,e._y=C,e.xperiodalignment&&(e._origX=A),e.yperiodalignment&&(e._origY=S);var L=new Array(k);for(r=0;r1&&i.extendFlat(s.line,p.linePositions(t,r,n));if(s.errorX||s.errorY){var l=p.errorBarPositions(t,r,n,a,o);s.errorX&&i.extendFlat(s.errorX,l.x),s.errorY&&i.extendFlat(s.errorY,l.y)}s.text&&(i.extendFlat(s.text,{positions:n},p.textPosition(t,r,s.text,s.marker)),i.extendFlat(s.textSel,{positions:n},p.textPosition(t,r,s.text,s.markerSel)),i.extendFlat(s.textUnsel,{positions:n},p.textPosition(t,r,s.text,s.markerUnsel)));return s}(t,0,e,L,E,C),O=d(t,_);return f(y,e),T?z.marker&&(P=2*(z.marker.sizeAvg||Math.max(z.marker.size,3))):P=c(e,w),u(t,e,x,b,E,C,P),z.errorX&&v(e,x,z.errorX),z.errorY&&v(e,b,z.errorY),z.fill&&!O.fill2d&&(O.fill2d=!0),z.marker&&!O.scatter2d&&(O.scatter2d=!0),z.line&&!O.line2d&&(O.line2d=!0),!z.errorX&&!z.errorY||O.error2d||(O.error2d=!0),z.text&&!O.glText&&(O.glText=!0),z.marker&&(z.marker.snap=w),O.lineOptions.push(z.line),O.errorXOptions.push(z.errorX),O.errorYOptions.push(z.errorY),O.fillOptions.push(z.fill),O.markerOptions.push(z.marker),O.markerSelectedOptions.push(z.markerSel),O.markerUnselectedOptions.push(z.markerUnsel),O.textOptions.push(z.text),O.textSelectedOptions.push(z.textSel),O.textUnselectedOptions.push(z.textUnsel),O.selectBatch.push([]),O.unselectBatch.push([]),M._scene=O,M.index=O.count,M.x=E,M.y=C,M.positions=L,O.count++,[{x:!1,y:!1,t:M,trace:e}]}},{\"../../constants/numerical\":753,\"../../lib\":778,\"../../plots/cartesian/align_period\":825,\"../../plots/cartesian/autorange\":827,\"../../plots/cartesian/axis_ids\":831,\"../scatter/calc\":1188,\"../scatter/colorscale_calc\":1190,\"./constants\":1241,\"./convert\":1242,\"./scene_update\":1250,\"@plotly/point-cluster\":57}],1241:[function(t,e,r){\"use strict\";e.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:20,SYMBOL_STROKE:1,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}},{}],1242:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"svg-path-sdf\"),a=t(\"color-normalize\"),o=t(\"../../registry\"),s=t(\"../../lib\"),l=t(\"../../components/drawing\"),c=t(\"../../plots/cartesian/axis_ids\"),u=t(\"../../lib/gl_format_color\").formatColor,f=t(\"../scatter/subtypes\"),h=t(\"../scatter/make_bubble_size_func\"),p=t(\"./helpers\"),d=t(\"./constants\"),g=t(\"../../constants/interactions\").DESELECTDIM,m={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},v=t(\"../../components/fx/helpers\").appendArrayPointValue;function y(t,e){var r,i=t._fullLayout,a=e._length,o=e.textfont,l=e.textposition,c=Array.isArray(l)?l:[l],u=o.color,f=o.size,h=o.family,p={},d=e.texttemplate;if(d){p.text=[];var g=i._d3locale,m=Array.isArray(d),y=m?Math.min(d.length,a):a,x=m?function(t){return d[t]}:function(){return d};for(r=0;rd.TOO_MANY_POINTS||f.hasMarkers(e)?\"rect\":\"round\";if(c&&e.connectgaps){var h=n[0],p=n[1];for(i=0;i1?l[i]:l[0]:l,d=Array.isArray(c)?c.length>1?c[i]:c[0]:c,g=m[p],v=m[d],y=u?u/.8+1:0,x=-v*y-.5*v;o.offset[i]=[g*y/h,x/h]}}return o}}},{\"../../components/drawing\":665,\"../../components/fx/helpers\":679,\"../../constants/interactions\":752,\"../../lib\":778,\"../../lib/gl_format_color\":774,\"../../plots/cartesian/axis_ids\":831,\"../../registry\":911,\"../scatter/make_bubble_size_func\":1204,\"../scatter/subtypes\":1212,\"./constants\":1241,\"./helpers\":1246,\"color-normalize\":125,\"fast-isnumeric\":241,\"svg-path-sdf\":574}],1243:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../registry\"),a=t(\"./helpers\"),o=t(\"./attributes\"),s=t(\"../scatter/constants\"),l=t(\"../scatter/subtypes\"),c=t(\"../scatter/xy_defaults\"),u=t(\"../scatter/period_defaults\"),f=t(\"../scatter/marker_defaults\"),h=t(\"../scatter/line_defaults\"),p=t(\"../scatter/fillcolor_defaults\"),d=t(\"../scatter/text_defaults\");e.exports=function(t,e,r,g){function m(r,i){return n.coerce(t,e,o,r,i)}var v=!!t.marker&&a.isOpenSymbol(t.marker.symbol),y=l.isBubble(t),x=c(t,e,g,m);if(x){u(t,e,g,m);var b=x100},r.isDotSymbol=function(t){return\"string\"==typeof t?n.DOT_RE.test(t):t>200}},{\"./constants\":1241}],1247:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"../scatter/get_trace_color\");function o(t,e,r,o){var s=t.xa,l=t.ya,c=t.distance,u=t.dxy,f=t.index,h={pointNumber:f,x:e[f],y:r[f]};h.tx=Array.isArray(o.text)?o.text[f]:o.text,h.htx=Array.isArray(o.hovertext)?o.hovertext[f]:o.hovertext,h.data=Array.isArray(o.customdata)?o.customdata[f]:o.customdata,h.tp=Array.isArray(o.textposition)?o.textposition[f]:o.textposition;var p=o.textfont;p&&(h.ts=i.isArrayOrTypedArray(p.size)?p.size[f]:p.size,h.tc=Array.isArray(p.color)?p.color[f]:p.color,h.tf=Array.isArray(p.family)?p.family[f]:p.family);var d=o.marker;d&&(h.ms=i.isArrayOrTypedArray(d.size)?d.size[f]:d.size,h.mo=i.isArrayOrTypedArray(d.opacity)?d.opacity[f]:d.opacity,h.mx=i.isArrayOrTypedArray(d.symbol)?d.symbol[f]:d.symbol,h.mc=i.isArrayOrTypedArray(d.color)?d.color[f]:d.color);var g=d&&d.line;g&&(h.mlc=Array.isArray(g.color)?g.color[f]:g.color,h.mlw=i.isArrayOrTypedArray(g.width)?g.width[f]:g.width);var m=d&&d.gradient;m&&\"none\"!==m.type&&(h.mgt=Array.isArray(m.type)?m.type[f]:m.type,h.mgc=Array.isArray(m.color)?m.color[f]:m.color);var v=s.c2p(h.x,!0),y=l.c2p(h.y,!0),x=h.mrc||1,b=o.hoverlabel;b&&(h.hbg=Array.isArray(b.bgcolor)?b.bgcolor[f]:b.bgcolor,h.hbc=Array.isArray(b.bordercolor)?b.bordercolor[f]:b.bordercolor,h.hts=i.isArrayOrTypedArray(b.font.size)?b.font.size[f]:b.font.size,h.htc=Array.isArray(b.font.color)?b.font.color[f]:b.font.color,h.htf=Array.isArray(b.font.family)?b.font.family[f]:b.font.family,h.hnl=i.isArrayOrTypedArray(b.namelength)?b.namelength[f]:b.namelength);var _=o.hoverinfo;_&&(h.hi=Array.isArray(_)?_[f]:_);var w=o.hovertemplate;w&&(h.ht=Array.isArray(w)?w[f]:w);var T={};T[t.index]=h;var k=o._origX,M=o._origY,A=i.extendFlat({},t,{color:a(o,h),x0:v-x,x1:v+x,xLabelVal:k?k[f]:h.x,y0:y-x,y1:y+x,yLabelVal:M?M[f]:h.y,cd:T,distance:c,spikeDistance:u,hovertemplate:h.ht});return h.htx?A.text=h.htx:h.tx?A.text=h.tx:o.text&&(A.text=o.text),i.fillText(h,o,A),n.getComponentMethod(\"errorbars\",\"hoverInfo\")(h,o,A),A}e.exports={hoverPoints:function(t,e,r,n){var i,a,s,l,c,u,f,h,p,d=t.cd,g=d[0].t,m=d[0].trace,v=t.xa,y=t.ya,x=g.x,b=g.y,_=v.c2p(e),w=y.c2p(r),T=t.distance;if(g.tree){var k=v.p2c(_-T),M=v.p2c(_+T),A=y.p2c(w-T),S=y.p2c(w+T);i=\"x\"===n?g.tree.range(Math.min(k,M),Math.min(y._rl[0],y._rl[1]),Math.max(k,M),Math.max(y._rl[0],y._rl[1])):g.tree.range(Math.min(k,M),Math.min(A,S),Math.max(k,M),Math.max(A,S))}else i=g.ids;var E=T;if(\"x\"===n)for(c=0;c-1;c--)s=x[i[c]],l=b[i[c]],u=v.c2p(s)-_,f=y.c2p(l)-w,(h=Math.sqrt(u*u+f*f))v.glText.length){var w=b-v.glText.length;for(d=0;dr&&(isNaN(e[n])||isNaN(e[n+1]));)n-=2;t.positions=e.slice(r,n+2)}return t})),v.line2d.update(v.lineOptions)),v.error2d){var k=(v.errorXOptions||[]).concat(v.errorYOptions||[]);v.error2d.update(k)}v.scatter2d&&v.scatter2d.update(v.markerOptions),v.fillOrder=s.repeat(null,b),v.fill2d&&(v.fillOptions=v.fillOptions.map((function(t,e){var n=r[e];if(t&&n&&n[0]&&n[0].trace){var i,a,o=n[0],s=o.trace,l=o.t,c=v.lineOptions[e],u=[];s._ownfill&&u.push(e),s._nexttrace&&u.push(e+1),u.length&&(v.fillOrder[e]=u);var f,h,p=[],d=c&&c.positions||l.positions;if(\"tozeroy\"===s.fill){for(f=0;ff&&isNaN(d[h+1]);)h-=2;0!==d[f+1]&&(p=[d[f],0]),p=p.concat(d.slice(f,h+2)),0!==d[h+1]&&(p=p.concat([d[h],0]))}else if(\"tozerox\"===s.fill){for(f=0;ff&&isNaN(d[h]);)h-=2;0!==d[f]&&(p=[0,d[f+1]]),p=p.concat(d.slice(f,h+2)),0!==d[h]&&(p=p.concat([0,d[h+1]]))}else if(\"toself\"===s.fill||\"tonext\"===s.fill){for(p=[],i=0,a=0;a-1;for(d=0;d=0?Math.floor((e+180)/360):Math.ceil((e-180)/360)),d=e-p;if(n.getClosest(l,(function(t){var e=t.lonlat;if(e[0]===s)return 1/0;var n=i.modHalf(e[0],360),a=e[1],o=h.project([n,a]),l=o.x-u.c2p([d,a]),c=o.y-f.c2p([n,r]),p=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(l*l+c*c)-p,1-3/p)}),t),!1!==t.index){var g=l[t.index],m=g.lonlat,v=[i.modHalf(m[0],360)+p,m[1]],y=u.c2p(v),x=f.c2p(v),b=g.mrc||1;t.x0=y-b,t.x1=y+b,t.y0=x-b,t.y1=x+b;var _={};_[c.subplot]={_subplot:h};var w=c._module.formatLabels(g,c,_);return t.lonLabel=w.lonLabel,t.latLabel=w.latLabel,t.color=a(c,g),t.extraText=function(t,e,r){if(t.hovertemplate)return;var n=(e.hi||t.hoverinfo).split(\"+\"),i=-1!==n.indexOf(\"all\"),a=-1!==n.indexOf(\"lon\"),s=-1!==n.indexOf(\"lat\"),l=e.lonlat,c=[];function u(t){return t+\"\\xb0\"}i||a&&s?c.push(\"(\"+u(l[0])+\", \"+u(l[1])+\")\"):a?c.push(r.lon+u(l[0])):s&&c.push(r.lat+u(l[1]));(i||-1!==n.indexOf(\"text\"))&&o(e,t,c);return c.join(\"
\")}(c,g,l[0].t.labels),t.hovertemplate=c.hovertemplate,[t]}}},{\"../../components/fx\":683,\"../../constants/numerical\":753,\"../../lib\":778,\"../scatter/get_trace_color\":1197}],1258:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"../scattergeo/calc\"),plot:t(\"./plot\"),hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),styleOnSelect:function(t,e){e&&e[0].trace._glTrace.update(e)},moduleType:\"trace\",name:\"scattermapbox\",basePlotModule:t(\"../../plots/mapbox\"),categories:[\"mapbox\",\"gl\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../plots/mapbox\":885,\"../scatter/marker_colorbar\":1205,\"../scattergeo/calc\":1230,\"./attributes\":1252,\"./defaults\":1254,\"./event_data\":1255,\"./format_labels\":1256,\"./hover\":1257,\"./plot\":1259,\"./select\":1260}],1259:[function(t,e,r){\"use strict\";var n=t(\"./convert\"),i=t(\"../../plots/mapbox/constants\").traceLayerPrefix,a=[\"fill\",\"line\",\"circle\",\"symbol\"];function o(t,e){this.type=\"scattermapbox\",this.subplot=t,this.uid=e,this.sourceIds={fill:\"source-\"+e+\"-fill\",line:\"source-\"+e+\"-line\",circle:\"source-\"+e+\"-circle\",symbol:\"source-\"+e+\"-symbol\"},this.layerIds={fill:i+e+\"-fill\",line:i+e+\"-line\",circle:i+e+\"-circle\",symbol:i+e+\"-symbol\"},this.below=null}var s=o.prototype;s.addSource=function(t,e){this.subplot.map.addSource(this.sourceIds[t],{type:\"geojson\",data:e.geojson})},s.setSourceData=function(t,e){this.subplot.map.getSource(this.sourceIds[t]).setData(e.geojson)},s.addLayer=function(t,e,r){this.subplot.addLayer({type:t,id:this.layerIds[t],source:this.sourceIds[t],layout:e.layout,paint:e.paint},r)},s.update=function(t){var e,r,i,o=this.subplot,s=o.map,l=n(o.gd,t),c=o.belowLookup[\"trace-\"+this.uid];if(c!==this.below){for(e=a.length-1;e>=0;e--)r=a[e],s.removeLayer(this.layerIds[r]);for(e=0;e=0;e--){var r=a[e];t.removeLayer(this.layerIds[r]),t.removeSource(this.sourceIds[r])}},e.exports=function(t,e){for(var r=e[0].trace,i=new o(t,r.uid),s=n(t.gd,e),l=i.below=t.belowLookup[\"trace-\"+r.uid],c=0;c\")}}e.exports={hoverPoints:function(t,e,r,a){var o=n(t,e,r,a);if(o&&!1!==o[0].index){var s=o[0];if(void 0===s.index)return o;var l=t.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,i(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:i}},{\"../scatter/hover\":1198}],1266:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"scatterpolar\",basePlotModule:t(\"../../plots/polar\"),categories:[\"polar\",\"symbols\",\"showLegend\",\"scatter-like\"],attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\").hoverPoints,selectPoints:t(\"../scatter/select\"),meta:{}}},{\"../../plots/polar\":894,\"../scatter/marker_colorbar\":1205,\"../scatter/select\":1209,\"../scatter/style\":1211,\"./attributes\":1261,\"./calc\":1262,\"./defaults\":1263,\"./format_labels\":1264,\"./hover\":1265,\"./plot\":1267}],1267:[function(t,e,r){\"use strict\";var n=t(\"../scatter/plot\"),i=t(\"../../constants/numerical\").BADNUM;e.exports=function(t,e,r){for(var a=e.layers.frontplot.select(\"g.scatterlayer\"),o={xaxis:e.xaxis,yaxis:e.yaxis,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},s=e.radialAxis,l=e.angularAxis,c=0;c=c&&(y.marker.cluster=d.tree),y.marker&&(y.markerSel.positions=y.markerUnsel.positions=y.marker.positions=_),y.line&&_.length>1&&l.extendFlat(y.line,s.linePositions(t,p,_)),y.text&&(l.extendFlat(y.text,{positions:_},s.textPosition(t,p,y.text,y.marker)),l.extendFlat(y.textSel,{positions:_},s.textPosition(t,p,y.text,y.markerSel)),l.extendFlat(y.textUnsel,{positions:_},s.textPosition(t,p,y.text,y.markerUnsel))),y.fill&&!h.fill2d&&(h.fill2d=!0),y.marker&&!h.scatter2d&&(h.scatter2d=!0),y.line&&!h.line2d&&(h.line2d=!0),y.text&&!h.glText&&(h.glText=!0),h.lineOptions.push(y.line),h.fillOptions.push(y.fill),h.markerOptions.push(y.marker),h.markerSelectedOptions.push(y.markerSel),h.markerUnselectedOptions.push(y.markerUnsel),h.textOptions.push(y.text),h.textSelectedOptions.push(y.textSel),h.textUnselectedOptions.push(y.textUnsel),h.selectBatch.push([]),h.unselectBatch.push([]),d.x=w,d.y=T,d.rawx=w,d.rawy=T,d.r=m,d.theta=v,d.positions=_,d._scene=h,d.index=h.count,h.count++}})),a(t,e,r)}}},{\"../../lib\":778,\"../scattergl/constants\":1241,\"../scattergl/convert\":1242,\"../scattergl/plot\":1249,\"../scattergl/scene_update\":1250,\"@plotly/point-cluster\":57,\"fast-isnumeric\":241}],1275:[function(t,e,r){\"use strict\";var n=t(\"../../plots/template_attributes\").hovertemplateAttrs,i=t(\"../../plots/template_attributes\").texttemplateAttrs,a=t(\"../scatter/attributes\"),o=t(\"../../plots/attributes\"),s=t(\"../../components/colorscale/attributes\"),l=t(\"../../components/drawing/attributes\").dash,c=t(\"../../lib/extend\").extendFlat,u=a.marker,f=a.line,h=u.line;e.exports={a:{valType:\"data_array\",editType:\"calc\"},b:{valType:\"data_array\",editType:\"calc\"},c:{valType:\"data_array\",editType:\"calc\"},sum:{valType:\"number\",dflt:0,min:0,editType:\"calc\"},mode:c({},a.mode,{dflt:\"markers\"}),text:c({},a.text,{}),texttemplate:i({editType:\"plot\"},{keys:[\"a\",\"b\",\"c\",\"text\"]}),hovertext:c({},a.hovertext,{}),line:{color:f.color,width:f.width,dash:l,shape:c({},f.shape,{values:[\"linear\",\"spline\"]}),smoothing:f.smoothing,editType:\"calc\"},connectgaps:a.connectgaps,cliponaxis:a.cliponaxis,fill:c({},a.fill,{values:[\"none\",\"toself\",\"tonext\"],dflt:\"none\"}),fillcolor:a.fillcolor,marker:c({symbol:u.symbol,opacity:u.opacity,maxdisplayed:u.maxdisplayed,size:u.size,sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,line:c({width:h.width,editType:\"calc\"},s(\"marker.line\")),gradient:u.gradient,editType:\"calc\"},s(\"marker\")),textfont:a.textfont,textposition:a.textposition,selected:a.selected,unselected:a.unselected,hoverinfo:c({},o.hoverinfo,{flags:[\"a\",\"b\",\"c\",\"text\",\"name\"]}),hoveron:a.hoveron,hovertemplate:n()}},{\"../../components/colorscale/attributes\":650,\"../../components/drawing/attributes\":664,\"../../lib/extend\":768,\"../../plots/attributes\":824,\"../../plots/template_attributes\":906,\"../scatter/attributes\":1187}],1276:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../scatter/colorscale_calc\"),a=t(\"../scatter/arrays_to_calcdata\"),o=t(\"../scatter/calc_selection\"),s=t(\"../scatter/calc\").calcMarkerSize,l=[\"a\",\"b\",\"c\"],c={a:[\"b\",\"c\"],b:[\"a\",\"c\"],c:[\"a\",\"b\"]};e.exports=function(t,e){var r,u,f,h,p,d,g=t._fullLayout[e.subplot].sum,m=e.sum||g,v={a:e.a,b:e.b,c:e.c};for(r=0;r\"),o.hovertemplate=h.hovertemplate,a}function x(t,e){v.push(t._hovertitle+\": \"+e)}}},{\"../scatter/hover\":1198}],1281:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"../scatter/select\"),eventData:t(\"./event_data\"),moduleType:\"trace\",name:\"scatterternary\",basePlotModule:t(\"../../plots/ternary\"),categories:[\"ternary\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../plots/ternary\":907,\"../scatter/marker_colorbar\":1205,\"../scatter/select\":1209,\"../scatter/style\":1211,\"./attributes\":1275,\"./calc\":1276,\"./defaults\":1277,\"./event_data\":1278,\"./format_labels\":1279,\"./hover\":1280,\"./plot\":1282}],1282:[function(t,e,r){\"use strict\";var n=t(\"../scatter/plot\");e.exports=function(t,e,r){var i=e.plotContainer;i.select(\".scatterlayer\").selectAll(\"*\").remove();var a={xaxis:e.xaxis,yaxis:e.yaxis,plot:i,layerClipId:e._hasClipOnAxisFalse?e.clipIdRelative:null},o=e.layers.frontplot.select(\"g.scatterlayer\");n(t,a,r,o)}},{\"../scatter/plot\":1208}],1283:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../components/colorscale/attributes\"),a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../scattergl/attributes\"),s=t(\"../../plots/cartesian/constants\").idRegex,l=t(\"../../plot_api/plot_template\").templatedArray,c=t(\"../../lib/extend\").extendFlat,u=n.marker,f=u.line,h=c(i(\"marker.line\",{editTypeOverride:\"calc\"}),{width:c({},f.width,{editType:\"calc\"}),editType:\"calc\"}),p=c(i(\"marker\"),{symbol:u.symbol,size:c({},u.size,{editType:\"markerSize\"}),sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,opacity:u.opacity,colorbar:u.colorbar,line:h,editType:\"calc\"});function d(t){return{valType:\"info_array\",freeLength:!0,editType:\"calc\",items:{valType:\"subplotid\",regex:s[t],editType:\"plot\"}}}p.color.editType=p.cmin.editType=p.cmax.editType=\"style\",e.exports={dimensions:l(\"dimension\",{visible:{valType:\"boolean\",dflt:!0,editType:\"calc\"},label:{valType:\"string\",editType:\"calc\"},values:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},axis:{type:{valType:\"enumerated\",values:[\"linear\",\"log\",\"date\",\"category\"],editType:\"calc+clearAxisTypes\"},matches:{valType:\"boolean\",dflt:!1,editType:\"calc\"},editType:\"calc+clearAxisTypes\"},editType:\"calc+clearAxisTypes\"}),text:c({},o.text,{}),hovertext:c({},o.hovertext,{}),hovertemplate:a(),marker:p,xaxes:d(\"x\"),yaxes:d(\"y\"),diagonal:{visible:{valType:\"boolean\",dflt:!0,editType:\"calc\"},editType:\"calc\"},showupperhalf:{valType:\"boolean\",dflt:!0,editType:\"calc\"},showlowerhalf:{valType:\"boolean\",dflt:!0,editType:\"calc\"},selected:{marker:o.selected.marker,editType:\"calc\"},unselected:{marker:o.unselected.marker,editType:\"calc\"},opacity:o.opacity}},{\"../../components/colorscale/attributes\":650,\"../../lib/extend\":768,\"../../plot_api/plot_template\":817,\"../../plots/cartesian/constants\":834,\"../../plots/template_attributes\":906,\"../scatter/attributes\":1187,\"../scattergl/attributes\":1239}],1284:[function(t,e,r){\"use strict\";var n=t(\"regl-line2d\"),i=t(\"../../registry\"),a=t(\"../../lib/prepare_regl\"),o=t(\"../../plots/get_data\").getModuleCalcData,s=t(\"../../plots/cartesian\"),l=t(\"../../plots/cartesian/axis_ids\").getFromId,c=t(\"../../plots/cartesian/axes\").shouldShowZeroLine;function u(t,e,r){for(var n=r.matrixOptions.data.length,i=e._visibleDims,a=r.viewOpts.ranges=new Array(n),o=0;oh?2*(b.sizeAvg||Math.max(b.size,3)):a(e,x),p=0;pa&&l||i-1,A=!0;if(o(x)||!!p.selectedpoints||M){var S=p._length;if(p.selectedpoints){g.selectBatch=p.selectedpoints;var E=p.selectedpoints,C={};for(l=0;l1&&(u=g[y-1],h=m[y-1],d=v[y-1]),e=0;eu?\"-\":\"+\")+\"x\")).replace(\"y\",(f>h?\"-\":\"+\")+\"y\")).replace(\"z\",(p>d?\"-\":\"+\")+\"z\");var C=function(){y=0,A=[],S=[],E=[]};(!y||y2?t.slice(1,e-1):2===e?[(t[0]+t[1])/2]:t}function p(t){var e=t.length;return 1===e?[.5,.5]:[t[1]-t[0],t[e-1]-t[e-2]]}function d(t,e){var r=t.fullSceneLayout,i=t.dataScale,u=e._len,f={};function d(t,e){var n=r[e],o=i[c[e]];return a.simpleMap(t,(function(t){return n.d2l(t)*o}))}if(f.vectors=l(d(e._u,\"xaxis\"),d(e._v,\"yaxis\"),d(e._w,\"zaxis\"),u),!u)return{positions:[],cells:[]};var g=d(e._Xs,\"xaxis\"),m=d(e._Ys,\"yaxis\"),v=d(e._Zs,\"zaxis\");if(f.meshgrid=[g,m,v],f.gridFill=e._gridFill,e._slen)f.startingPositions=l(d(e._startsX,\"xaxis\"),d(e._startsY,\"yaxis\"),d(e._startsZ,\"zaxis\"));else{for(var y=m[0],x=h(g),b=h(v),_=new Array(x.length*b.length),w=0,T=0;T=0};v?(r=Math.min(m.length,x.length),l=function(t){return M(m[t])&&A(t)},f=function(t){return String(m[t])}):(r=Math.min(y.length,x.length),l=function(t){return M(y[t])&&A(t)},f=function(t){return String(y[t])}),_&&(r=Math.min(r,b.length));for(var S=0;S1){for(var I=a.randstr(),P=0;P\"),name:k||z(\"name\")?l.name:void 0,color:T(\"hoverlabel.bgcolor\")||y.color,borderColor:T(\"hoverlabel.bordercolor\"),fontFamily:T(\"hoverlabel.font.family\"),fontSize:T(\"hoverlabel.font.size\"),fontColor:T(\"hoverlabel.font.color\"),nameLength:T(\"hoverlabel.namelength\"),textAlign:T(\"hoverlabel.align\"),hovertemplate:k,hovertemplateLabels:L,eventData:[f(i,l,h.eventDataKeys)]};m&&(R.x0=S-i.rInscribed*i.rpx1,R.x1=S+i.rInscribed*i.rpx1,R.idealAlign=i.pxmid[0]<0?\"left\":\"right\"),v&&(R.x=S,R.idealAlign=S<0?\"left\":\"right\"),o.loneHover(R,{container:a._hoverlayer.node(),outerContainer:a._paper.node(),gd:r}),d._hasHoverLabel=!0}if(v){var F=t.select(\"path.surface\");h.styleOne(F,i,l,{hovered:!0})}d._hasHoverEvent=!0,r.emit(\"plotly_hover\",{points:[f(i,l,h.eventDataKeys)],event:n.event})}})),t.on(\"mouseout\",(function(e){var i=r._fullLayout,a=r._fullData[d.index],s=n.select(this).datum();if(d._hasHoverEvent&&(e.originalEvent=n.event,r.emit(\"plotly_unhover\",{points:[f(s,a,h.eventDataKeys)],event:n.event}),d._hasHoverEvent=!1),d._hasHoverLabel&&(o.loneUnhover(i._hoverlayer.node()),d._hasHoverLabel=!1),v){var l=t.select(\"path.surface\");h.styleOne(l,s,a,{hovered:!1})}})),t.on(\"click\",(function(t){var e=r._fullLayout,a=r._fullData[d.index],s=m&&(c.isHierarchyRoot(t)||c.isLeaf(t)),u=c.getPtId(t),p=c.isEntry(t)?c.findEntryWithChild(g,u):c.findEntryWithLevel(g,u),v=c.getPtId(p),y={points:[f(t,a,h.eventDataKeys)],event:n.event};s||(y.nextLevel=v);var x=l.triggerHandler(r,\"plotly_\"+d.type+\"click\",y);if(!1!==x&&e.hovermode&&(r._hoverdata=[f(t,a,h.eventDataKeys)],o.click(r,n.event)),!s&&!1!==x&&!r._dragging&&!r._transitioning){i.call(\"_storeDirectGUIEdit\",a,e._tracePreGUI[a.uid],{level:a.level});var b={data:[{level:v}],traces:[d.index]},_={frame:{redraw:!1,duration:h.transitionTime},transition:{duration:h.transitionTime,easing:h.transitionEasing},mode:\"immediate\",fromcurrent:!0};o.loneUnhover(e._hoverlayer.node()),i.call(\"animate\",r,b,_)}}))}},{\"../../components/fx\":683,\"../../components/fx/helpers\":679,\"../../lib\":778,\"../../lib/events\":767,\"../../registry\":911,\"../pie/helpers\":1166,\"./helpers\":1305,d3:169}],1305:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/color\"),a=t(\"../../lib/setcursor\"),o=t(\"../pie/helpers\");function s(t){return t.data.data.pid}r.findEntryWithLevel=function(t,e){var n;return e&&t.eachAfter((function(t){if(r.getPtId(t)===e)return n=t.copy()})),n||t},r.findEntryWithChild=function(t,e){var n;return t.eachAfter((function(t){for(var i=t.children||[],a=0;a0)},r.getMaxDepth=function(t){return t.maxdepth>=0?t.maxdepth:1/0},r.isHeader=function(t,e){return!(r.isLeaf(t)||t.depth===e._maxDepth-1)},r.getParent=function(t,e){return r.findEntryWithLevel(t,s(e))},r.listPath=function(t,e){var n=t.parent;if(!n)return[];var i=e?[n.data[e]]:[n];return r.listPath(n,e).concat(i)},r.getPath=function(t){return r.listPath(t,\"label\").join(\"/\")+\"/\"},r.formatValue=o.formatPieValue,r.formatPercent=function(t,e){var r=n.formatPercent(t,0);return\"0%\"===r&&(r=o.formatPiePercent(t,e)),r}},{\"../../components/color\":643,\"../../lib\":778,\"../../lib/setcursor\":799,\"../pie/helpers\":1166}],1306:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"sunburst\",basePlotModule:t(\"./base_plot\"),categories:[],animatable:!0,attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\"),supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\").calc,crossTraceCalc:t(\"./calc\").crossTraceCalc,plot:t(\"./plot\").plot,style:t(\"./style\").style,colorbar:t(\"../scatter/marker_colorbar\"),meta:{}}},{\"../scatter/marker_colorbar\":1205,\"./attributes\":1299,\"./base_plot\":1300,\"./calc\":1301,\"./defaults\":1303,\"./layout_attributes\":1307,\"./layout_defaults\":1308,\"./plot\":1309,\"./style\":1310}],1307:[function(t,e,r){\"use strict\";e.exports={sunburstcolorway:{valType:\"colorlist\",editType:\"calc\"},extendsunburstcolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}},{}],1308:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}r(\"sunburstcolorway\",e.colorway),r(\"extendsunburstcolors\")}},{\"../../lib\":778,\"./layout_attributes\":1307}],1309:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"d3-hierarchy\"),a=t(\"../../components/drawing\"),o=t(\"../../lib\"),s=t(\"../../lib/svg_text_utils\"),l=t(\"../bar/uniform_text\"),c=l.recordMinTextSize,u=l.clearMinTextSize,f=t(\"../pie/plot\"),h=t(\"../pie/helpers\").getRotationAngle,p=f.computeTransform,d=f.transformInsideText,g=t(\"./style\").styleOne,m=t(\"../bar/style\").resizeText,v=t(\"./fx\"),y=t(\"./constants\"),x=t(\"./helpers\");function b(t,e,l,u){var f=t._fullLayout,m=!f.uniformtext.mode&&x.hasTransition(u),b=n.select(l).selectAll(\"g.slice\"),w=e[0],T=w.trace,k=w.hierarchy,M=x.findEntryWithLevel(k,T.level),A=x.getMaxDepth(T),S=f._size,E=T.domain,C=S.w*(E.x[1]-E.x[0]),L=S.h*(E.y[1]-E.y[0]),I=.5*Math.min(C,L),P=w.cx=S.l+S.w*(E.x[1]+E.x[0])/2,z=w.cy=S.t+S.h*(1-E.y[0])-L/2;if(!M)return b.remove();var O=null,D={};m&&b.each((function(t){D[x.getPtId(t)]={rpx0:t.rpx0,rpx1:t.rpx1,x0:t.x0,x1:t.x1,transform:t.transform},!O&&x.isEntry(t)&&(O=t)}));var R=function(t){return i.partition().size([2*Math.PI,t.height+1])(t)}(M).descendants(),F=M.height+1,B=0,N=A;w.hasMultipleRoots&&x.isHierarchyRoot(M)&&(R=R.slice(1),F-=1,B=1,N+=1),R=R.filter((function(t){return t.y1<=N}));var j=h(T.rotation);j&&R.forEach((function(t){t.x0+=j,t.x1+=j}));var U=Math.min(F,A),V=function(t){return(t-B)/U*I},q=function(t,e){return[t*Math.cos(e),-t*Math.sin(e)]},H=function(t){return o.pathAnnulus(t.rpx0,t.rpx1,t.x0,t.x1,P,z)},G=function(t){return P+_(t)[0]*(t.transform.rCenter||0)+(t.transform.x||0)},Y=function(t){return z+_(t)[1]*(t.transform.rCenter||0)+(t.transform.y||0)};(b=b.data(R,x.getPtId)).enter().append(\"g\").classed(\"slice\",!0),m?b.exit().transition().each((function(){var t=n.select(this);t.select(\"path.surface\").transition().attrTween(\"d\",(function(t){var e=function(t){var e,r=x.getPtId(t),i=D[r],a=D[x.getPtId(M)];if(a){var o=(t.x1>a.x1?2*Math.PI:0)+j;e=t.rpx1W?2*Math.PI:0)+j;e={x0:a,x1:a}}else e={rpx0:I,rpx1:I},o.extendFlat(e,J(t));else e={rpx0:0,rpx1:0};else e={x0:j,x1:j};return n.interpolate(e,i)}(t);return function(t){return H(e(t))}})):u.attr(\"d\",H),l.call(v,M,t,e,{eventDataKeys:y.eventDataKeys,transitionTime:y.CLICK_TRANSITION_TIME,transitionEasing:y.CLICK_TRANSITION_EASING}).call(x.setSliceCursor,t,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:t._transitioning}),u.call(g,i,T);var h=o.ensureSingle(l,\"g\",\"slicetext\"),b=o.ensureSingle(h,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),_=o.ensureUniformFontSize(t,x.determineTextFont(T,i,f.font));b.text(r.formatSliceLabel(i,M,T,e,f)).classed(\"slicetext\",!0).attr(\"text-anchor\",\"middle\").call(a.font,_).call(s.convertToTspans,t);var k=a.bBox(b.node());i.transform=d(k,i,w),i.transform.targetX=G(i),i.transform.targetY=Y(i);var A=function(t,e){var r=t.transform;return p(r,e),r.fontSize=_.size,c(T.type,r,f),o.getTextTransform(r)};m?b.transition().attrTween(\"transform\",(function(t){var e=function(t){var e,r=D[x.getPtId(t)],i=t.transform;if(r)e=r;else if(e={rpx1:t.rpx1,transform:{textPosAngle:i.textPosAngle,scale:0,rotate:i.rotate,rCenter:i.rCenter,x:i.x,y:i.y}},O)if(t.parent)if(W){var a=t.x1>W?2*Math.PI:0;e.x0=e.x1=a}else o.extendFlat(e,J(t));else e.x0=e.x1=j;else e.x0=e.x1=j;var s=n.interpolate(e.transform.textPosAngle,t.transform.textPosAngle),l=n.interpolate(e.rpx1,t.rpx1),u=n.interpolate(e.x0,t.x0),h=n.interpolate(e.x1,t.x1),p=n.interpolate(e.transform.scale,i.scale),d=n.interpolate(e.transform.rotate,i.rotate),g=0===i.rCenter?3:0===e.transform.rCenter?1/3:1,m=n.interpolate(e.transform.rCenter,i.rCenter);return function(t){var e=l(t),r=u(t),n=h(t),a=function(t){return m(Math.pow(t,g))}(t),o={pxmid:q(e,(r+n)/2),rpx1:e,transform:{textPosAngle:s(t),rCenter:a,x:i.x,y:i.y}};return c(T.type,i,f),{transform:{targetX:G(o),targetY:Y(o),scale:p(t),rotate:d(t),rCenter:a}}}}(t);return function(t){return A(e(t),k)}})):b.attr(\"transform\",A(i,k))}))}function _(t){return e=t.rpx1,r=t.transform.textPosAngle,[e*Math.sin(r),-e*Math.cos(r)];var e,r}r.plot=function(t,e,r,i){var a,o,s=t._fullLayout,l=s._sunburstlayer,c=!r,f=!s.uniformtext.mode&&x.hasTransition(r);(u(\"sunburst\",s),(a=l.selectAll(\"g.trace.sunburst\").data(e,(function(t){return t[0].trace.uid}))).enter().append(\"g\").classed(\"trace\",!0).classed(\"sunburst\",!0).attr(\"stroke-linejoin\",\"round\"),a.order(),f)?(i&&(o=i()),n.transition().duration(r.duration).ease(r.easing).each(\"end\",(function(){o&&o()})).each(\"interrupt\",(function(){o&&o()})).each((function(){l.selectAll(\"g.trace\").each((function(e){b(t,e,this,r)}))}))):(a.each((function(e){b(t,e,this,r)})),s.uniformtext.mode&&m(t,s._sunburstlayer.selectAll(\".trace\"),\"sunburst\"));c&&a.exit().remove()},r.formatSliceLabel=function(t,e,r,n,i){var a=r.texttemplate,s=r.textinfo;if(!(a||s&&\"none\"!==s))return\"\";var l=i.separators,c=n[0],u=t.data.data,f=c.hierarchy,h=x.isHierarchyRoot(t),p=x.getParent(f,t),d=x.getValue(t);if(!a){var g,m=s.split(\"+\"),v=function(t){return-1!==m.indexOf(t)},y=[];if(v(\"label\")&&u.label&&y.push(u.label),u.hasOwnProperty(\"v\")&&v(\"value\")&&y.push(x.formatValue(u.v,l)),!h){v(\"current path\")&&y.push(x.getPath(t.data));var b=0;v(\"percent parent\")&&b++,v(\"percent entry\")&&b++,v(\"percent root\")&&b++;var _=b>1;if(b){var w,T=function(t){g=x.formatPercent(w,l),_&&(g+=\" of \"+t),y.push(g)};v(\"percent parent\")&&!h&&(w=d/x.getValue(p),T(\"parent\")),v(\"percent entry\")&&(w=d/x.getValue(e),T(\"entry\")),v(\"percent root\")&&(w=d/x.getValue(f),T(\"root\"))}}return v(\"text\")&&(g=o.castOption(r,u.i,\"text\"),o.isValidTextValue(g)&&y.push(g)),y.join(\"
\")}var k=o.castOption(r,u.i,\"texttemplate\");if(!k)return\"\";var M={};u.label&&(M.label=u.label),u.hasOwnProperty(\"v\")&&(M.value=u.v,M.valueLabel=x.formatValue(u.v,l)),M.currentPath=x.getPath(t.data),h||(M.percentParent=d/x.getValue(p),M.percentParentLabel=x.formatPercent(M.percentParent,l),M.parent=x.getPtLabel(p)),M.percentEntry=d/x.getValue(e),M.percentEntryLabel=x.formatPercent(M.percentEntry,l),M.entry=x.getPtLabel(e),M.percentRoot=d/x.getValue(f),M.percentRootLabel=x.formatPercent(M.percentRoot,l),M.root=x.getPtLabel(f),u.hasOwnProperty(\"color\")&&(M.color=u.color);var A=o.castOption(r,u.i,\"text\");return(o.isValidTextValue(A)||\"\"===A)&&(M.text=A),M.customdata=o.castOption(r,u.i,\"customdata\"),o.texttemplateString(k,M,i._d3locale,M,r._meta||{})}},{\"../../components/drawing\":665,\"../../lib\":778,\"../../lib/svg_text_utils\":803,\"../bar/style\":935,\"../bar/uniform_text\":937,\"../pie/helpers\":1166,\"../pie/plot\":1170,\"./constants\":1302,\"./fx\":1304,\"./helpers\":1305,\"./style\":1310,d3:169,\"d3-hierarchy\":161}],1310:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../components/color\"),a=t(\"../../lib\"),o=t(\"../bar/uniform_text\").resizeText;function s(t,e,r){var n=e.data.data,o=!e.children,s=n.i,l=a.castOption(r,s,\"marker.line.color\")||i.defaultLine,c=a.castOption(r,s,\"marker.line.width\")||0;t.style(\"stroke-width\",c).call(i.fill,n.color).call(i.stroke,l).style(\"opacity\",o?r.leaf.opacity:null)}e.exports={style:function(t){var e=t._fullLayout._sunburstlayer.selectAll(\".trace\");o(t,e,\"sunburst\"),e.each((function(t){var e=n.select(this),r=t[0].trace;e.style(\"opacity\",r.opacity),e.selectAll(\"path.surface\").each((function(t){n.select(this).call(s,t,r)}))}))},styleOne:s}},{\"../../components/color\":643,\"../../lib\":778,\"../bar/uniform_text\":937,d3:169}],1311:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"../../components/colorscale/attributes\"),a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../../plots/attributes\"),s=t(\"../../lib/extend\").extendFlat,l=t(\"../../plot_api/edit_types\").overrideAll;function c(t){return{show:{valType:\"boolean\",dflt:!1},start:{valType:\"number\",dflt:null,editType:\"plot\"},end:{valType:\"number\",dflt:null,editType:\"plot\"},size:{valType:\"number\",dflt:null,min:0,editType:\"plot\"},project:{x:{valType:\"boolean\",dflt:!1},y:{valType:\"boolean\",dflt:!1},z:{valType:\"boolean\",dflt:!1}},color:{valType:\"color\",dflt:n.defaultLine},usecolormap:{valType:\"boolean\",dflt:!1},width:{valType:\"number\",min:1,max:16,dflt:2},highlight:{valType:\"boolean\",dflt:!0},highlightcolor:{valType:\"color\",dflt:n.defaultLine},highlightwidth:{valType:\"number\",min:1,max:16,dflt:2}}}var u=e.exports=l(s({z:{valType:\"data_array\"},x:{valType:\"data_array\"},y:{valType:\"data_array\"},text:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertemplate:a(),connectgaps:{valType:\"boolean\",dflt:!1,editType:\"calc\"},surfacecolor:{valType:\"data_array\"}},i(\"\",{colorAttr:\"z or surfacecolor\",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:\"calc\"}),{contours:{x:c(),y:c(),z:c()},hidesurface:{valType:\"boolean\",dflt:!1},lightposition:{x:{valType:\"number\",min:-1e5,max:1e5,dflt:10},y:{valType:\"number\",min:-1e5,max:1e5,dflt:1e4},z:{valType:\"number\",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:\"number\",min:0,max:1,dflt:.8},diffuse:{valType:\"number\",min:0,max:1,dflt:.8},specular:{valType:\"number\",min:0,max:2,dflt:.05},roughness:{valType:\"number\",min:0,max:1,dflt:.5},fresnel:{valType:\"number\",min:0,max:5,dflt:.2}},opacity:{valType:\"number\",min:0,max:1,dflt:1},opacityscale:{valType:\"any\",editType:\"calc\"},_deprecated:{zauto:s({},i.zauto,{}),zmin:s({},i.zmin,{}),zmax:s({},i.zmax,{})},hoverinfo:s({},o.hoverinfo),showlegend:s({},o.showlegend,{dflt:!1})}),\"calc\",\"nested\");u.x.editType=u.y.editType=u.z.editType=\"calc+clearAxisTypes\",u.transforms=void 0},{\"../../components/color\":643,\"../../components/colorscale/attributes\":650,\"../../lib/extend\":768,\"../../plot_api/edit_types\":810,\"../../plots/attributes\":824,\"../../plots/template_attributes\":906}],1312:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\");e.exports=function(t,e){e.surfacecolor?n(t,e,{vals:e.surfacecolor,containerStr:\"\",cLetter:\"c\"}):n(t,e,{vals:e.z,containerStr:\"\",cLetter:\"c\"})}},{\"../../components/colorscale/calc\":651}],1313:[function(t,e,r){\"use strict\";var n=t(\"gl-surface3d\"),i=t(\"ndarray\"),a=t(\"ndarray-linear-interpolate\").d2,o=t(\"../heatmap/interp2d\"),s=t(\"../heatmap/find_empties\"),l=t(\"../../lib\").isArrayOrTypedArray,c=t(\"../../lib/gl_format_color\").parseColorScale,u=t(\"../../lib/str2rgbarray\"),f=t(\"../../components/colorscale\").extractOpts;function h(t,e,r){this.scene=t,this.uid=r,this.surface=e,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var p=h.prototype;p.getXat=function(t,e,r,n){var i=l(this.data.x)?l(this.data.x[0])?this.data.x[e][t]:this.data.x[t]:t;return void 0===r?i:n.d2l(i,0,r)},p.getYat=function(t,e,r,n){var i=l(this.data.y)?l(this.data.y[0])?this.data.y[e][t]:this.data.y[e]:e;return void 0===r?i:n.d2l(i,0,r)},p.getZat=function(t,e,r,n){var i=this.data.z[e][t];return null===i&&this.data.connectgaps&&this.data._interpolatedZ&&(i=this.data._interpolatedZ[e][t]),void 0===r?i:n.d2l(i,0,r)},p.handlePick=function(t){if(t.object===this.surface){var e=(t.data.index[0]-1)/this.dataScaleX-1,r=(t.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(e),this.data.z[0].length-1),0),i=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);t.index=[n,i],t.traceCoordinate=[this.getXat(n,i),this.getYat(n,i),this.getZat(n,i)],t.dataCoordinate=[this.getXat(n,i,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(n,i,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(n,i,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var a=0;a<3;a++){var o=t.dataCoordinate[a];null!=o&&(t.dataCoordinate[a]*=this.scene.dataScale[a])}var s=this.data.hovertext||this.data.text;return Array.isArray(s)&&s[i]&&void 0!==s[i][n]?t.textLabel=s[i][n]:t.textLabel=s||\"\",t.data.dataCoordinate=t.dataCoordinate.slice(),this.surface.highlight(t.data),this.scene.glplot.spikes.position=t.dataCoordinate,!0}};var d=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function g(t,e){if(t0){r=d[n];break}return r}function y(t,e){if(!(t<1||e<1)){for(var r=m(t),n=m(e),i=1,a=0;a_;)r--,r/=v(r),++r1?n:1},p.refineCoords=function(t){for(var e=this.dataScaleX,r=this.dataScaleY,n=t[0].shape[0],a=t[0].shape[1],o=0|Math.floor(t[0].shape[0]*e+1),s=0|Math.floor(t[0].shape[1]*r+1),l=1+n+1,c=1+a+1,u=i(new Float32Array(l*c),[l,c]),f=[1/e,0,0,0,1/r,0,0,0,1],h=0;h0&&null!==this.contourStart[t]&&null!==this.contourEnd[t]&&this.contourEnd[t]>this.contourStart[t]))for(i[t]=!0,e=this.contourStart[t];ea&&(this.minValues[e]=a),this.maxValues[e]\",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:\"cubic-out\",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:\"cubic-out\",uplift:5,wrapSpacer:\" \",wrapSplitCharacter:\" \",cn:{table:\"table\",tableControlView:\"table-control-view\",scrollBackground:\"scroll-background\",yColumn:\"y-column\",columnBlock:\"column-block\",scrollAreaClip:\"scroll-area-clip\",scrollAreaClipRect:\"scroll-area-clip-rect\",columnBoundary:\"column-boundary\",columnBoundaryClippath:\"column-boundary-clippath\",columnBoundaryRect:\"column-boundary-rect\",columnCells:\"column-cells\",columnCell:\"column-cell\",cellRect:\"cell-rect\",cellText:\"cell-text\",cellTextHolder:\"cell-text-holder\",scrollbarKit:\"scrollbar-kit\",scrollbar:\"scrollbar\",scrollbarSlider:\"scrollbar-slider\",scrollbarGlyph:\"scrollbar-glyph\",scrollbarCaptureZone:\"scrollbar-capture-zone\"}}},{}],1320:[function(t,e,r){\"use strict\";var n=t(\"./constants\"),i=t(\"../../lib/extend\").extendFlat,a=t(\"fast-isnumeric\");function o(t){if(Array.isArray(t)){for(var e=0,r=0;r=e||c===t.length-1)&&(n[i]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=c,o={firstRowIndex:null,lastRowIndex:null,rows:[]},i+=a,s=c+1,a=0);return n}e.exports=function(t,e){var r=l(e.cells.values),p=function(t){return t.slice(e.header.values.length,t.length)},d=l(e.header.values);d.length&&!d[0].length&&(d[0]=[\"\"],d=l(d));var g=d.concat(p(r).map((function(){return c((d[0]||[\"\"]).length)}))),m=e.domain,v=Math.floor(t._fullLayout._size.w*(m.x[1]-m.x[0])),y=Math.floor(t._fullLayout._size.h*(m.y[1]-m.y[0])),x=e.header.values.length?g[0].map((function(){return e.header.height})):[n.emptyHeaderHeight],b=r.length?r[0].map((function(){return e.cells.height})):[],_=x.reduce(s,0),w=h(b,y-_+n.uplift),T=f(h(x,_),[]),k=f(w,T),M={},A=e._fullInput.columnorder.concat(p(r.map((function(t,e){return e})))),S=g.map((function(t,r){var n=Array.isArray(e.columnwidth)?e.columnwidth[Math.min(r,e.columnwidth.length-1)]:e.columnwidth;return a(n)?Number(n):1})),E=S.reduce(s,0);S=S.map((function(t){return t/E*v}));var C=Math.max(o(e.header.line.width),o(e.cells.line.width)),L={key:e.uid+t._context.staticPlot,translateX:m.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-m.y[1]),size:t._fullLayout._size,width:v,maxLineWidth:C,height:y,columnOrder:A,groupHeight:y,rowBlocks:k,headerRowBlocks:T,scrollY:0,cells:i({},e.cells,{values:r}),headerCells:i({},e.header,{values:g}),gdColumns:g.map((function(t){return t[0]})),gdColumnsOriginalOrder:g.map((function(t){return t[0]})),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:g.map((function(t,e){var r=M[t];return M[t]=(r||0)+1,{key:t+\"__\"+M[t],label:t,specIndex:e,xIndex:A[e],xScale:u,x:void 0,calcdata:void 0,columnWidth:S[e]}}))};return L.columns.forEach((function(t){t.calcdata=L,t.x=u(t)})),L}},{\"../../lib/extend\":768,\"./constants\":1319,\"fast-isnumeric\":241}],1321:[function(t,e,r){\"use strict\";var n=t(\"../../lib/extend\").extendFlat;r.splitToPanels=function(t){var e=[0,0],r=n({},t,{key:\"header\",type:\"header\",page:0,prevPages:e,currentRepaint:[null,null],dragHandle:!0,values:t.calcdata.headerCells.values[t.specIndex],rowBlocks:t.calcdata.headerRowBlocks,calcdata:n({},t.calcdata,{cells:t.calcdata.headerCells})});return[n({},t,{key:\"cells1\",type:\"cells\",page:0,prevPages:e,currentRepaint:[null,null],dragHandle:!1,values:t.calcdata.cells.values[t.specIndex],rowBlocks:t.calcdata.rowBlocks}),n({},t,{key:\"cells2\",type:\"cells\",page:1,prevPages:e,currentRepaint:[null,null],dragHandle:!1,values:t.calcdata.cells.values[t.specIndex],rowBlocks:t.calcdata.rowBlocks}),r]},r.splitToCells=function(t){var e=function(t){var e=t.rowBlocks[t.page],r=e?e.rows[0].rowIndex:0,n=e?r+e.rows.length:0;return[r,n]}(t);return(t.values||[]).slice(e[0],e[1]).map((function(r,n){return{keyWithinBlock:n+(\"string\"==typeof r&&r.match(/[<$&> ]/)?\"_keybuster_\"+Math.random():\"\"),key:e[0]+n,column:t,calcdata:t.calcdata,page:t.page,rowBlocks:t.rowBlocks,value:r}}))}},{\"../../lib/extend\":768}],1322:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"../../plots/domain\").defaults;e.exports=function(t,e,r,o){function s(r,a){return n.coerce(t,e,i,r,a)}a(e,o,s),s(\"columnwidth\"),s(\"header.values\"),s(\"header.format\"),s(\"header.align\"),s(\"header.prefix\"),s(\"header.suffix\"),s(\"header.height\"),s(\"header.line.width\"),s(\"header.line.color\"),s(\"header.fill.color\"),n.coerceFont(s,\"header.font\",n.extendFlat({},o.font)),function(t,e){for(var r=t.columnorder||[],n=t.header.values.length,i=r.slice(0,n),a=i.slice().sort((function(t,e){return t-e})),o=i.map((function(t){return a.indexOf(t)})),s=o.length;s/i),l=!o||s;t.mayHaveMarkup=o&&a.match(/[<&>]/);var c,u=\"string\"==typeof(c=a)&&c.match(n.latexCheck);t.latex=u;var f,h,p=u?\"\":w(t.calcdata.cells.prefix,e,r)||\"\",d=u?\"\":w(t.calcdata.cells.suffix,e,r)||\"\",g=u?null:w(t.calcdata.cells.format,e,r)||null,m=p+(g?i.format(g)(t.value):t.value)+d;if(t.wrappingNeeded=!t.wrapped&&!l&&!u&&(f=_(m)),t.cellHeightMayIncrease=s||u||t.mayHaveMarkup||(void 0===f?_(m):f),t.needsConvertToTspans=t.mayHaveMarkup||t.wrappingNeeded||t.latex,t.wrappingNeeded){var v=(\" \"===n.wrapSplitCharacter?m.replace(/i&&n.push(a),i+=l}return n}(i,l,s);1===u.length&&(u[0]===i.length-1?u.unshift(u[0]-1):u.push(u[0]+1)),u[0]%2&&u.reverse(),e.each((function(t,e){t.page=u[e],t.scrollY=l})),e.attr(\"transform\",(function(t){var e=O(t.rowBlocks,t.page)-t.scrollY;return c(0,e)})),t&&(C(t,r,e,u,n.prevPages,n,0),C(t,r,e,u,n.prevPages,n,1),y(r,t))}}function E(t,e,r,a){return function(o){var s=o.calcdata?o.calcdata:o,l=e.filter((function(t){return s.key===t.key})),c=r||s.scrollbarState.dragMultiplier,u=s.scrollY;s.scrollY=void 0===a?s.scrollY+c*i.event.dy:a;var f=l.selectAll(\".\"+n.cn.yColumn).selectAll(\".\"+n.cn.columnBlock).filter(k);return S(t,f,l),s.scrollY===u}}function C(t,e,r,n,i,a,o){n[o]!==i[o]&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout((function(){var a=r.filter((function(t,e){return e===o&&n[e]!==i[e]}));x(t,e,a,r),i[o]=n[o]})))}function L(t,e,r,a){return function(){var o=i.select(e.parentNode);o.each((function(t){var e=t.fragments;o.selectAll(\"tspan.line\").each((function(t,r){e[r].width=this.getComputedTextLength()}));var r,i,a=e[e.length-1].width,s=e.slice(0,-1),l=[],c=0,u=t.column.columnWidth-2*n.cellPad;for(t.value=\"\";s.length;)c+(i=(r=s.shift()).width+a)>u&&(t.value+=l.join(n.wrapSpacer)+n.lineBreaker,l=[],c=0),l.push(r.text),c+=i;c&&(t.value+=l.join(n.wrapSpacer)),t.wrapped=!0})),o.selectAll(\"tspan.line\").remove(),b(o.select(\".\"+n.cn.cellText),r,t,a),i.select(e.parentNode.parentNode).call(z)}}function I(t,e,r,a,o){return function(){if(!o.settledY){var s=i.select(e.parentNode),l=F(o),u=o.key-l.firstRowIndex,f=l.rows[u].rowHeight,h=o.cellHeightMayIncrease?e.parentNode.getBoundingClientRect().height+2*n.cellPad:f,p=Math.max(h,f);p-l.rows[u].rowHeight&&(l.rows[u].rowHeight=p,t.selectAll(\".\"+n.cn.columnCell).call(z),S(null,t.filter(k),0),y(r,a,!0)),s.attr(\"transform\",(function(){var t=this.parentNode.getBoundingClientRect(),e=i.select(this.parentNode).select(\".\"+n.cn.cellRect).node().getBoundingClientRect(),r=this.transform.baseVal.consolidate(),a=e.top-t.top+(r?r.matrix.f:n.cellPad);return c(P(o,i.select(this.parentNode).select(\".\"+n.cn.cellTextHolder).node().getBoundingClientRect().width),a)})),o.settledY=!0}}}function P(t,e){switch(t.align){case\"left\":return n.cellPad;case\"right\":return t.column.columnWidth-(e||0)-n.cellPad;case\"center\":return(t.column.columnWidth-(e||0))/2;default:return n.cellPad}}function z(t){t.attr(\"transform\",(function(t){var e=t.rowBlocks[0].auxiliaryBlocks.reduce((function(t,e){return t+D(e,1/0)}),0),r=D(F(t),t.key);return c(0,r+e)})).selectAll(\".\"+n.cn.cellRect).attr(\"height\",(function(t){return(e=F(t),r=t.key,e.rows[r-e.firstRowIndex]).rowHeight;var e,r}))}function O(t,e){for(var r=0,n=e-1;n>=0;n--)r+=R(t[n]);return r}function D(t,e){for(var r=0,n=0;n\",\"<\",\"|\",\"/\",\"\\\\\"],dflt:\">\",editType:\"plot\"},thickness:{valType:\"number\",min:12,editType:\"plot\"},textfont:u({},s.textfont,{}),editType:\"calc\"},text:s.text,textinfo:l.textinfo,texttemplate:i({editType:\"plot\"},{keys:c.eventDataKeys.concat([\"label\",\"value\"])}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:n({},{keys:c.eventDataKeys}),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:u({},s.outsidetextfont,{}),textposition:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle left\",\"middle center\",\"middle right\",\"bottom left\",\"bottom center\",\"bottom right\"],dflt:\"top left\",editType:\"plot\"},sort:s.sort,root:l.root,domain:o({name:\"treemap\",trace:!0,editType:\"calc\"})}},{\"../../components/colorscale/attributes\":650,\"../../lib/extend\":768,\"../../plots/domain\":855,\"../../plots/template_attributes\":906,\"../pie/attributes\":1161,\"../sunburst/attributes\":1299,\"./constants\":1328}],1326:[function(t,e,r){\"use strict\";var n=t(\"../../plots/plots\");r.name=\"treemap\",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{\"../../plots/plots\":891}],1327:[function(t,e,r){\"use strict\";var n=t(\"../sunburst/calc\");r.calc=function(t,e){return n.calc(t,e)},r.crossTraceCalc=function(t){return n._runCrossTraceCalc(\"treemap\",t)}},{\"../sunburst/calc\":1301}],1328:[function(t,e,r){\"use strict\";e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:\"poly\",eventDataKeys:[\"currentPath\",\"root\",\"entry\",\"percentRoot\",\"percentEntry\",\"percentParent\"],gapWithPathbar:1}},{}],1329:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"../../components/color\"),o=t(\"../../plots/domain\").defaults,s=t(\"../bar/defaults\").handleText,l=t(\"../bar/constants\").TEXTPAD,c=t(\"../../components/colorscale\"),u=c.hasColorscale,f=c.handleDefaults;e.exports=function(t,e,r,c){function h(r,a){return n.coerce(t,e,i,r,a)}var p=h(\"labels\"),d=h(\"parents\");if(p&&p.length&&d&&d.length){var g=h(\"values\");g&&g.length?h(\"branchvalues\"):h(\"count\"),h(\"level\"),h(\"maxdepth\"),\"squarify\"===h(\"tiling.packing\")&&h(\"tiling.squarifyratio\"),h(\"tiling.flip\"),h(\"tiling.pad\");var m=h(\"text\");h(\"texttemplate\"),e.texttemplate||h(\"textinfo\",Array.isArray(m)?\"text+label\":\"label\"),h(\"hovertext\"),h(\"hovertemplate\");var v=h(\"pathbar.visible\");s(t,e,c,h,\"auto\",{hasPathbar:v,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h(\"textposition\");var y=-1!==e.textposition.indexOf(\"bottom\");h(\"marker.line.width\")&&h(\"marker.line.color\",c.paper_bgcolor);var x=h(\"marker.colors\"),b=e._hasColorscale=u(t,\"marker\",\"colors\")||(t.marker||{}).coloraxis;b?f(t,e,c,h,{prefix:\"marker.\",cLetter:\"c\"}):h(\"marker.depthfade\",!(x||[]).length);var _=2*e.textfont.size;h(\"marker.pad.t\",y?_/4:_),h(\"marker.pad.l\",_/4),h(\"marker.pad.r\",_/4),h(\"marker.pad.b\",y?_:_/4),b&&f(t,e,c,h,{prefix:\"marker.\",cLetter:\"c\"}),e._hovered={marker:{line:{width:2,color:a.contrast(c.paper_bgcolor)}}},v&&(h(\"pathbar.thickness\",e.pathbar.textfont.size+2*l),h(\"pathbar.side\"),h(\"pathbar.edgeshape\")),h(\"sort\"),h(\"root.color\"),o(e,c,h),e._length=null}else e.visible=!1}},{\"../../components/color\":643,\"../../components/colorscale\":655,\"../../lib\":778,\"../../plots/domain\":855,\"../bar/constants\":923,\"../bar/defaults\":925,\"./attributes\":1325}],1330:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../lib\"),a=t(\"../../components/drawing\"),o=t(\"../../lib/svg_text_utils\"),s=t(\"./partition\"),l=t(\"./style\").styleOne,c=t(\"./constants\"),u=t(\"../sunburst/helpers\"),f=t(\"../sunburst/fx\");e.exports=function(t,e,r,h,p){var d=p.barDifY,g=p.width,m=p.height,v=p.viewX,y=p.viewY,x=p.pathSlice,b=p.toMoveInsideSlice,_=p.strTransform,w=p.hasTransition,T=p.handleSlicesExit,k=p.makeUpdateSliceInterpolator,M=p.makeUpdateTextInterpolator,A={},S=t._fullLayout,E=e[0],C=E.trace,L=E.hierarchy,I=g/C._entryDepth,P=u.listPath(r.data,\"id\"),z=s(L.copy(),[g,m],{packing:\"dice\",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();(z=z.filter((function(t){var e=P.indexOf(t.data.id);return-1!==e&&(t.x0=I*e,t.x1=I*(e+1),t.y0=d,t.y1=d+m,t.onPathbar=!0,!0)}))).reverse(),(h=h.data(z,u.getPtId)).enter().append(\"g\").classed(\"pathbar\",!0),T(h,!0,A,[g,m],x),h.order();var O=h;w&&(O=O.transition().each(\"end\",(function(){var e=n.select(this);u.setSliceCursor(e,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})}))),O.each((function(s){s._hoverX=v(s.x1-Math.min(g,m)/2),s._hoverY=y(s.y1-m/2);var h=n.select(this),p=i.ensureSingle(h,\"path\",\"surface\",(function(t){t.style(\"pointer-events\",\"all\")}));w?p.transition().attrTween(\"d\",(function(t){var e=k(t,!0,A,[g,m]);return function(t){return x(e(t))}})):p.attr(\"d\",x),h.call(f,r,t,e,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),p.call(l,s,C,{hovered:!1}),s._text=(u.getPtLabel(s)||\"\").split(\"
\").join(\" \")||\"\";var d=i.ensureSingle(h,\"g\",\"slicetext\"),T=i.ensureSingle(d,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),E=i.ensureUniformFontSize(t,u.determineTextFont(C,s,S.font,{onPathbar:!0}));T.text(s._text||\" \").classed(\"slicetext\",!0).attr(\"text-anchor\",\"start\").call(a.font,E).call(o.convertToTspans,t),s.textBB=a.bBox(T.node()),s.transform=b(s,{fontSize:E.size,onPathbar:!0}),s.transform.fontSize=E.size,w?T.transition().attrTween(\"transform\",(function(t){var e=M(t,!0,A,[g,m]);return function(t){return _(e(t))}})):T.attr(\"transform\",_(s))}))}},{\"../../components/drawing\":665,\"../../lib\":778,\"../../lib/svg_text_utils\":803,\"../sunburst/fx\":1304,\"../sunburst/helpers\":1305,\"./constants\":1328,\"./partition\":1335,\"./style\":1337,d3:169}],1331:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../lib\"),a=t(\"../../components/drawing\"),o=t(\"../../lib/svg_text_utils\"),s=t(\"./partition\"),l=t(\"./style\").styleOne,c=t(\"./constants\"),u=t(\"../sunburst/helpers\"),f=t(\"../sunburst/fx\"),h=t(\"../sunburst/plot\").formatSliceLabel;e.exports=function(t,e,r,p,d){var g=d.width,m=d.height,v=d.viewX,y=d.viewY,x=d.pathSlice,b=d.toMoveInsideSlice,_=d.strTransform,w=d.hasTransition,T=d.handleSlicesExit,k=d.makeUpdateSliceInterpolator,M=d.makeUpdateTextInterpolator,A=d.prevEntry,S=t._fullLayout,E=e[0].trace,C=-1!==E.textposition.indexOf(\"left\"),L=-1!==E.textposition.indexOf(\"right\"),I=-1!==E.textposition.indexOf(\"bottom\"),P=!I&&!E.marker.pad.t||I&&!E.marker.pad.b,z=s(r,[g,m],{packing:E.tiling.packing,squarifyratio:E.tiling.squarifyratio,flipX:E.tiling.flip.indexOf(\"x\")>-1,flipY:E.tiling.flip.indexOf(\"y\")>-1,pad:{inner:E.tiling.pad,top:E.marker.pad.t,left:E.marker.pad.l,right:E.marker.pad.r,bottom:E.marker.pad.b}}).descendants(),O=1/0,D=-1/0;z.forEach((function(t){var e=t.depth;e>=E._maxDepth?(t.x0=t.x1=(t.x0+t.x1)/2,t.y0=t.y1=(t.y0+t.y1)/2):(O=Math.min(O,e),D=Math.max(D,e))})),p=p.data(z,u.getPtId),E._maxVisibleLayers=isFinite(D)?D-O+1:0,p.enter().append(\"g\").classed(\"slice\",!0),T(p,!1,{},[g,m],x),p.order();var R=null;if(w&&A){var F=u.getPtId(A);p.each((function(t){null===R&&u.getPtId(t)===F&&(R={x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1})}))}var B=function(){return R||{x0:0,x1:g,y0:0,y1:m}},N=p;return w&&(N=N.transition().each(\"end\",(function(){var e=n.select(this);u.setSliceCursor(e,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),N.each((function(s){var p=u.isHeader(s,E);s._hoverX=v(s.x1-E.marker.pad.r),s._hoverY=y(I?s.y1-E.marker.pad.b/2:s.y0+E.marker.pad.t/2);var d=n.select(this),T=i.ensureSingle(d,\"path\",\"surface\",(function(t){t.style(\"pointer-events\",\"all\")}));w?T.transition().attrTween(\"d\",(function(t){var e=k(t,!1,B(),[g,m]);return function(t){return x(e(t))}})):T.attr(\"d\",x),d.call(f,r,t,e,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,t,{isTransitioning:t._transitioning}),T.call(l,s,E,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text=\"\":s._text=p?P?\"\":u.getPtLabel(s)||\"\":h(s,r,E,e,S)||\"\";var A=i.ensureSingle(d,\"g\",\"slicetext\"),z=i.ensureSingle(A,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),O=i.ensureUniformFontSize(t,u.determineTextFont(E,s,S.font));z.text(s._text||\" \").classed(\"slicetext\",!0).attr(\"text-anchor\",L?\"end\":C||p?\"start\":\"middle\").call(a.font,O).call(o.convertToTspans,t),s.textBB=a.bBox(z.node()),s.transform=b(s,{fontSize:O.size,isHeader:p}),s.transform.fontSize=O.size,w?z.transition().attrTween(\"transform\",(function(t){var e=M(t,!1,B(),[g,m]);return function(t){return _(e(t))}})):z.attr(\"transform\",_(s))})),R}},{\"../../components/drawing\":665,\"../../lib\":778,\"../../lib/svg_text_utils\":803,\"../sunburst/fx\":1304,\"../sunburst/helpers\":1305,\"../sunburst/plot\":1309,\"./constants\":1328,\"./partition\":1335,\"./style\":1337,d3:169}],1332:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"treemap\",basePlotModule:t(\"./base_plot\"),categories:[],animatable:!0,attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\"),supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\").calc,crossTraceCalc:t(\"./calc\").crossTraceCalc,plot:t(\"./plot\"),style:t(\"./style\").style,colorbar:t(\"../scatter/marker_colorbar\"),meta:{}}},{\"../scatter/marker_colorbar\":1205,\"./attributes\":1325,\"./base_plot\":1326,\"./calc\":1327,\"./defaults\":1329,\"./layout_attributes\":1333,\"./layout_defaults\":1334,\"./plot\":1336,\"./style\":1337}],1333:[function(t,e,r){\"use strict\";e.exports={treemapcolorway:{valType:\"colorlist\",editType:\"calc\"},extendtreemapcolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}},{}],1334:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}r(\"treemapcolorway\",e.colorway),r(\"extendtreemapcolors\")}},{\"../../lib\":778,\"./layout_attributes\":1333}],1335:[function(t,e,r){\"use strict\";var n=t(\"d3-hierarchy\");e.exports=function(t,e,r){var i,a=r.flipX,o=r.flipY,s=\"dice-slice\"===r.packing,l=r.pad[o?\"bottom\":\"top\"],c=r.pad[a?\"right\":\"left\"],u=r.pad[a?\"left\":\"right\"],f=r.pad[o?\"top\":\"bottom\"];s&&(i=c,c=l,l=i,i=u,u=f,f=i);var h=n.treemap().tile(function(t,e){switch(t){case\"squarify\":return n.treemapSquarify.ratio(e);case\"binary\":return n.treemapBinary;case\"dice\":return n.treemapDice;case\"slice\":return n.treemapSlice;default:return n.treemapSliceDice}}(r.packing,r.squarifyratio)).paddingInner(r.pad.inner).paddingLeft(c).paddingRight(u).paddingTop(l).paddingBottom(f).size(s?[e[1],e[0]]:e)(t);return(s||a||o)&&function t(e,r,n){var i;n.swapXY&&(i=e.x0,e.x0=e.y0,e.y0=i,i=e.x1,e.x1=e.y1,e.y1=i);n.flipX&&(i=e.x0,e.x0=r[0]-e.x1,e.x1=r[0]-i);n.flipY&&(i=e.y0,e.y0=r[1]-e.y1,e.y1=r[1]-i);var a=e.children;if(a)for(var o=0;o-1?E+I:-(L+I):0,z={x0:C,x1:C,y0:P,y1:P+L},O=function(t,e,r){var n=m.tiling.pad,i=function(t){return t-n<=e.x0},a=function(t){return t+n>=e.x1},o=function(t){return t-n<=e.y0},s=function(t){return t+n>=e.y1};return{x0:i(t.x0-n)?0:a(t.x0-n)?r[0]:t.x0,x1:i(t.x1+n)?0:a(t.x1+n)?r[0]:t.x1,y0:o(t.y0-n)?0:s(t.y0-n)?r[1]:t.y0,y1:o(t.y1+n)?0:s(t.y1+n)?r[1]:t.y1}},D=null,R={},F={},B=null,N=function(t,e){return e?R[g(t)]:F[g(t)]},j=function(t,e,r,n){if(e)return R[g(v)]||z;var i=F[m.level]||r;return function(t){return t.data.depth-y.data.depth=(n-=v.r-o)){var y=(r+n)/2;r=y,n=y}var x;h?i<(x=a-v.b)&&x\"===Q?(l.x-=a,c.x-=a,u.x-=a,f.x-=a):\"/\"===Q?(u.x-=a,f.x-=a,o.x-=a/2,s.x-=a/2):\"\\\\\"===Q?(l.x-=a,c.x-=a,o.x-=a/2,s.x-=a/2):\"<\"===Q&&(o.x-=a,s.x-=a),K(l),K(f),K(o),K(c),K(u),K(s),\"M\"+Z(l.x,l.y)+\"L\"+Z(c.x,c.y)+\"L\"+Z(s.x,s.y)+\"L\"+Z(u.x,u.y)+\"L\"+Z(f.x,f.y)+\"L\"+Z(o.x,o.y)+\"Z\"},toMoveInsideSlice:$,makeUpdateSliceInterpolator:et,makeUpdateTextInterpolator:rt,handleSlicesExit:nt,hasTransition:T,strTransform:it}):b.remove()}e.exports=function(t,e,r,a){var o,s,l=t._fullLayout,c=l._treemaplayer,h=!r;(u(\"treemap\",l),(o=c.selectAll(\"g.trace.treemap\").data(e,(function(t){return t[0].trace.uid}))).enter().append(\"g\").classed(\"trace\",!0).classed(\"treemap\",!0),o.order(),!l.uniformtext.mode&&i.hasTransition(r))?(a&&(s=a()),n.transition().duration(r.duration).ease(r.easing).each(\"end\",(function(){s&&s()})).each(\"interrupt\",(function(){s&&s()})).each((function(){c.selectAll(\"g.trace\").each((function(e){m(t,e,this,r)}))}))):(o.each((function(e){m(t,e,this,r)})),l.uniformtext.mode&&f(t,l._treemaplayer.selectAll(\".trace\"),\"treemap\"));h&&o.exit().remove()}},{\"../../lib\":778,\"../bar/constants\":923,\"../bar/plot\":932,\"../bar/style\":935,\"../bar/uniform_text\":937,\"../sunburst/helpers\":1305,\"./constants\":1328,\"./draw_ancestors\":1330,\"./draw_descendants\":1331,d3:169}],1337:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../components/color\"),a=t(\"../../lib\"),o=t(\"../sunburst/helpers\"),s=t(\"../bar/uniform_text\").resizeText;function l(t,e,r,n){var s,l,c=(n||{}).hovered,u=e.data.data,f=u.i,h=u.color,p=o.isHierarchyRoot(e),d=1;if(c)s=r._hovered.marker.line.color,l=r._hovered.marker.line.width;else if(p&&h===r.root.color)d=100,s=\"rgba(0,0,0,0)\",l=0;else if(s=a.castOption(r,f,\"marker.line.color\")||i.defaultLine,l=a.castOption(r,f,\"marker.line.width\")||0,!r._hasColorscale&&!e.onPathbar){var g=r.marker.depthfade;if(g){var m,v=i.combine(i.addOpacity(r._backgroundColor,.75),h);if(!0===g){var y=o.getMaxDepth(r);m=isFinite(y)?o.isLeaf(e)?0:r._maxVisibleLayers-(e.data.depth-r._entryDepth):e.data.height+1}else m=e.data.depth-r._entryDepth,r._atRootLevel||m++;if(m>0)for(var x=0;x0){var y,x,b,_,w,T=t.xa,k=t.ya;\"h\"===h.orientation?(w=e,y=\"y\",b=k,x=\"x\",_=T):(w=r,y=\"x\",b=T,x=\"y\",_=k);var M=f[t.index];if(w>=M.span[0]&&w<=M.span[1]){var A=n.extendFlat({},t),S=_.c2p(w,!0),E=o.getKdeValue(M,h,w),C=o.getPositionOnKdePath(M,h,S),L=b._offset,I=b._length;A[y+\"0\"]=C[0],A[y+\"1\"]=C[1],A[x+\"0\"]=A[x+\"1\"]=S,A[x+\"Label\"]=x+\": \"+i.hoverLabelText(_,w)+\", \"+f[0].t.labels.kde+\" \"+E.toFixed(3),A.spikeDistance=v[0].spikeDistance;var P=y+\"Spike\";A[P]=v[0][P],v[0].spikeDistance=void 0,v[0][P]=void 0,A.hovertemplate=!1,m.push(A),(u={stroke:t.color})[y+\"1\"]=n.constrain(L+C[0],L,L+I),u[y+\"2\"]=n.constrain(L+C[1],L,L+I),u[x+\"1\"]=u[x+\"2\"]=_._offset+S}}d&&(m=m.concat(v))}-1!==p.indexOf(\"points\")&&(c=a.hoverOnPoints(t,e,r));var z=l.selectAll(\".violinline-\"+h.uid).data(u?[0]:[]);return z.enter().append(\"line\").classed(\"violinline-\"+h.uid,!0).attr(\"stroke-width\",1.5),z.exit().remove(),z.attr(u),\"closest\"===s?c?[c]:m:c?(m.push(c),m):m}},{\"../../lib\":778,\"../../plots/cartesian/axes\":828,\"../box/hover\":951,\"./helpers\":1342}],1344:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\"),crossTraceDefaults:t(\"../box/defaults\").crossTraceDefaults,supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\"),crossTraceCalc:t(\"./cross_trace_calc\"),plot:t(\"./plot\"),style:t(\"./style\"),styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"../box/select\"),moduleType:\"trace\",name:\"violin\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"symbols\",\"oriented\",\"box-violin\",\"showLegend\",\"violinLayout\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":841,\"../box/defaults\":949,\"../box/select\":956,\"../scatter/style\":1211,\"./attributes\":1338,\"./calc\":1339,\"./cross_trace_calc\":1340,\"./defaults\":1341,\"./hover\":1343,\"./layout_attributes\":1345,\"./layout_defaults\":1346,\"./plot\":1347,\"./style\":1348}],1345:[function(t,e,r){\"use strict\";var n=t(\"../box/layout_attributes\"),i=t(\"../../lib\").extendFlat;e.exports={violinmode:i({},n.boxmode,{}),violingap:i({},n.boxgap,{}),violingroupgap:i({},n.boxgroupgap,{})}},{\"../../lib\":778,\"../box/layout_attributes\":953}],1346:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\"),a=t(\"../box/layout_defaults\");e.exports=function(t,e,r){a._supply(t,e,r,(function(r,a){return n.coerce(t,e,i,r,a)}),\"violin\")}},{\"../../lib\":778,\"../box/layout_defaults\":954,\"./layout_attributes\":1345}],1347:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../lib\"),a=t(\"../../components/drawing\"),o=t(\"../box/plot\"),s=t(\"../scatter/line_points\"),l=t(\"./helpers\");e.exports=function(t,e,r,c){var u=t._fullLayout,f=e.xaxis,h=e.yaxis;function p(t){var e=s(t,{xaxis:f,yaxis:h,connectGaps:!0,baseTolerance:.75,shape:\"spline\",simplify:!0,linearized:!0});return a.smoothopen(e[0],1)}i.makeTraceGroups(c,r,\"trace violins\").each((function(t){var r=n.select(this),a=t[0],s=a.t,c=a.trace;if(!0!==c.visible||s.empty)r.remove();else{var d=s.bPos,g=s.bdPos,m=e[s.valLetter+\"axis\"],v=e[s.posLetter+\"axis\"],y=\"both\"===c.side,x=y||\"positive\"===c.side,b=y||\"negative\"===c.side,_=r.selectAll(\"path.violin\").data(i.identity);_.enter().append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").attr(\"class\",\"violin\"),_.exit().remove(),_.each((function(t){var e,r,i,a,o,l,f,h,_=n.select(this),w=t.density,T=w.length,k=v.c2l(t.pos+d,!0),M=v.l2p(k);if(c.width)e=s.maxKDE/g;else{var A=u._violinScaleGroupStats[c.scalegroup];e=\"count\"===c.scalemode?A.maxKDE/g*(A.maxCount/t.pts.length):A.maxKDE/g}if(x){for(f=new Array(T),o=0;o\")),c.color=function(t,e){var r=t[e.dir].marker,n=r.color,a=r.line.color,o=r.line.width;if(i(n))return n;if(i(a)&&o)return a}(f,d),[c]}function w(t){return n(p,t)}}},{\"../../components/color\":643,\"../../constants/delta.js\":747,\"../../plots/cartesian/axes\":828,\"../bar/hover\":928}],1360:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,crossTraceDefaults:t(\"./defaults\").crossTraceDefaults,supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\"),crossTraceCalc:t(\"./cross_trace_calc\"),plot:t(\"./plot\"),style:t(\"./style\").style,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"../bar/select\"),moduleType:\"trace\",name:\"waterfall\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"bar-like\",\"cartesian\",\"svg\",\"oriented\",\"showLegend\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":841,\"../bar/select\":933,\"./attributes\":1353,\"./calc\":1354,\"./cross_trace_calc\":1356,\"./defaults\":1357,\"./event_data\":1358,\"./hover\":1359,\"./layout_attributes\":1361,\"./layout_defaults\":1362,\"./plot\":1363,\"./style\":1364}],1361:[function(t,e,r){\"use strict\";e.exports={waterfallmode:{valType:\"enumerated\",values:[\"group\",\"overlay\"],dflt:\"group\",editType:\"calc\"},waterfallgap:{valType:\"number\",min:0,max:1,editType:\"calc\"},waterfallgroupgap:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"}}},{}],1362:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e,r){var a=!1;function o(r,a){return n.coerce(t,e,i,r,a)}for(var s=0;s0&&(m+=h?\"M\"+f[0]+\",\"+d[1]+\"V\"+d[0]:\"M\"+f[1]+\",\"+d[0]+\"H\"+f[0]),\"between\"!==p&&(r.isSum||s path\").each((function(t){if(!t.isBlank){var e=s[t.dir].marker;n.select(this).call(a.fill,e.color).call(a.stroke,e.line.color).call(i.dashLine,e.line.dash,e.line.width).style(\"opacity\",s.selectedpoints&&!t.selected?o:1)}})),c(r,s,t),r.selectAll(\".lines\").each((function(){var t=s.connector.line;i.lineGroupStyle(n.select(this).selectAll(\"path\"),t.width,t.color,t.dash)}))}))}}},{\"../../components/color\":643,\"../../components/drawing\":665,\"../../constants/interactions\":752,\"../bar/style\":935,\"../bar/uniform_text\":937,d3:169}],1365:[function(t,e,r){\"use strict\";var n=t(\"../plots/cartesian/axes\"),i=t(\"../lib\"),a=t(\"../plot_api/plot_schema\"),o=t(\"./helpers\").pointsAccessorFunction,s=t(\"../constants/numerical\").BADNUM;r.moduleType=\"transform\",r.name=\"aggregate\";var l=r.attributes={enabled:{valType:\"boolean\",dflt:!0,editType:\"calc\"},groups:{valType:\"string\",strict:!0,noBlank:!0,arrayOk:!0,dflt:\"x\",editType:\"calc\"},aggregations:{_isLinkedToArray:\"aggregation\",target:{valType:\"string\",editType:\"calc\"},func:{valType:\"enumerated\",values:[\"count\",\"sum\",\"avg\",\"median\",\"mode\",\"rms\",\"stddev\",\"min\",\"max\",\"first\",\"last\",\"change\",\"range\"],dflt:\"first\",editType:\"calc\"},funcmode:{valType:\"enumerated\",values:[\"sample\",\"population\"],dflt:\"sample\",editType:\"calc\"},enabled:{valType:\"boolean\",dflt:!0,editType:\"calc\"},editType:\"calc\"},editType:\"calc\"},c=l.aggregations;function u(t,e,r,a){if(a.enabled){for(var o=a.target,l=i.nestedProperty(e,o),c=l.get(),u=function(t,e){var r=t.func,n=e.d2c,a=e.c2d;switch(r){case\"count\":return f;case\"first\":return h;case\"last\":return p;case\"sum\":return function(t,e){for(var r=0,i=0;ii&&(i=u,o=c)}}return i?a(o):s};case\"rms\":return function(t,e){for(var r=0,i=0,o=0;o\":return function(t){return h(t)>s};case\">=\":return function(t){return h(t)>=s};case\"[]\":return function(t){var e=h(t);return e>=s[0]&&e<=s[1]};case\"()\":return function(t){var e=h(t);return e>s[0]&&e=s[0]&&es[0]&&e<=s[1]};case\"][\":return function(t){var e=h(t);return e<=s[0]||e>=s[1]};case\")(\":return function(t){var e=h(t);return es[1]};case\"](\":return function(t){var e=h(t);return e<=s[0]||e>s[1]};case\")[\":return function(t){var e=h(t);return e=s[1]};case\"{}\":return function(t){return-1!==s.indexOf(h(t))};case\"}{\":return function(t){return-1===s.indexOf(h(t))}}}(r,a.getDataToCoordFunc(t,e,s,i),h),x={},b={},_=0;d?(m=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set(new Array(f))},v=function(t,e){var r=x[t.astr][e];t.get()[e]=r}):(m=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set([])},v=function(t,e){var r=x[t.astr][e];t.get().push(r)}),k(m);for(var w=o(e.transforms,r),T=0;T1?\"%{group} (%{trace})\":\"%{group}\");var l=t.styles,c=o.styles=[];if(l)for(a=0;a\n", + " " + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "name": "0 LightGBMRegressorHandler", + "type": "box", + "x": [ + "0" + ], + "y": [ + 0.45435876502509054, + 0.4594686690039794, + 0.43536577607621463, + 0.4361695313828906, + 0.4320306190144625 + ] + }, + { + "name": "1 LightGBMRegressorHandler", + "type": "box", + "x": [ + "1" + ], + "y": [ + 0.5919671790832179, + 0.5787376887464568, + 0.5429604361479364, + 0.5703329441673337, + 0.5540356336976218 + ] + }, + { + "name": "2 LightGBMRegressorHandler", + "type": "box", + "x": [ + "2" + ], + "y": [ + 0.5976603049819096, + 0.5797762031425182, + 0.5533905434721826, + 0.5822762811336842, + 0.5667931094344388 + ] + }, + { + "name": "3 KerasRegressorHandler", + "type": "box", + "x": [ + "3" + ], + "y": [ + 0.46582328410349294, + 0.4699781935947053, + 0.4501331351652126, + 0.44935445469277846, + 0.4414777696317401 + ] + }, + { + "name": "4 KerasRegressorHandler", + "type": "box", + "x": [ + "4" + ], + "y": [ + 0.4660524930200155, + 0.47029326150913775, + 0.45028955960927497, + 0.4485537645719735, + 0.440880914980995 + ] + }, + { + "name": "5 KerasRegressorHandler", + "type": "box", + "x": [ + "5" + ], + "y": [ + 0.46607873291243973, + 0.4703505796062878, + 0.4502555644295897, + 0.44868576046826725, + 0.440914640888994 + ] + }, + { + "name": "6 KerasRegressorHandler", + "type": "box", + "x": [ + "6" + ], + "y": [ + 0.4662125782860408, + 0.47010238615192557, + 0.44995504362272987, + 0.4487074850153733, + 0.44019380448057777 + ] + } + ], + "layout": { + "autosize": true, + "template": { + "data": { + "scatter": [ + { + "type": "scatter" + } + ] + } + }, + "xaxis": { + "autorange": true, + "range": [ + -0.5, + 6.5 + ], + "title": { + "text": "Model" + }, + "type": "linear" + }, + "yaxis": { + "autorange": true, + "range": [ + 0.44639756836082284, + 0.6056215016461773 + ], + "title": { + "text": "Score" + }, + "type": "linear" + } + } + }, + "image/png": "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gAIKKKCAAgoUWcDApcig7k4BBRRQQAEFFFBAAQUUUEABBRRosIHLnDlzYtq0abHccstFo0aNCroTfvvtt/juu+/SZxo3blzQZ9xIAQUUUEABBRRQQAEFFFBAAQUankCDC1z+/PPPuOGGG2LYsGHpahOcXHDBBdGlS5cyr/7EiRPj3HPPja+//jpt069fv+jbt2/Du1s8YwUUUEABBRRQQAEFFFBAAQUUKEigwQUuo0ePjpNPPjkuvvjiWHfddeOaa66J119/PR577LFSK12oaNlvv/1SILP33nvHWmutFbNnz44WLVoUBOxGCiiggAIKKKCAAgoooIACCijQ8AQaXOBy+eWXx6effhq33HJLutr/+9//Yt99942rr746OnfuPN8dcMkll6RA5vHHH4+FF1644d0hnrECCiiggAIKKKCAAgrUeYHXPp0So7+cVqXzOHbLTlX6nB9SoKELNLjA5aSTTopmzZrFGWecUXLtt9pqqzjttNOid+/e890Pe+yxR1p21KpVq/j+++9jlVVWiSOOOCLatWvX0O8dz18BBRRQQAEFFFBAAQXqiACBy4G3v13p2fbqtGzc2a9bpT/nBxRQIKLBBS6HH354rLbaanHiiSeWXP9tttkmBg4cGDvssMN89wRhzIorrhg77rhjLLroonH33XfHL7/8Ev/617/S33/88UfvIwUUUEABBRRQQAEFFFCgUgLLLLNMpbZf0I2zwGWFlk2ibbMlCtrdiAlTY0EDF3po0qaB/8BeZJFFCjpu/kY8f7HagOevisYzzzwT3bt3r1ILiLlz58bUqVNj6aWXjiWWKMyoovn4/eoVGDFiRLRu3TpWWmmlmDBhQlrRstFGG1XvJHKO1uACFypc+Mft9NNPL2EgVOHvm222WamBCz1f2IYxadKk6N+/f/z973+PNdZYI/gHxKGAAgoooIACCiiggAIKVEag0DelVmaf5W2bG7jsun77Cnc7aeqsGDb6vwsUuLz66qupd+bvv/+ejnfooYfGXnvtVeqx6an5j3/8I7VyyB8HHnhg6qV5yimnVDhvnttoC9G1a9f5tmU+77//fgwaNGie73344YdB64nsJSl8k56dtJ7Yaaed4quvvkovTskd/Kc8z5D8nn2ft9nec889JZux32OPPTY9/GctLdgfPUEZhEg8U7Lags/Wx3HmmWem0zrvvPNKTm/y5MnBNb311luTXzHHwQcfHFtssUXqw3rnnXfG8OHD03FqajS4wIUfpM8++yxuvvnmZJ41xS2rh8s+++wTW265ZckPGJ8dMGBAXHnllbHOOuvU1HXzuAoooIACCiiggAIKKKBAwQLVHbgQKuy6667pxSM8/L788stx2WWXxe233x4dOnSYb94ELoQSTz311Hzfo1Jh8cUXL6itQ3mBC6sVXnrppbjjjjvmC0U233zzFAJQHfHNN9+keRDOXHfddSWBCuFR27Zt44cffoiLLroohTL8R3xuIEOwkFVUEBC9++678wUuu+yyS2y99dap+oL9UP1z4403Fnwt69KGBC4UKZx//vkGLnXpwlV1rtzw3PgXXnhhrLfeenHVVVfFv//975K3FPEPwGuvvZbSMAZ/f/jhh+Omm26KpZZaKgUt77zzTjz00EOWmVX1Ivg5BeqwwGPjH4vJMyfX4TMoe+o7r7JztGtqf6p6eXE9KQUUUECBBi9Q3YHLK6+8kp65CC7oicno06dPEDbsv//+lQpcqFihl+buu++eHt6phHn00Udjzpw5Kcz47bffSkIUApdtt902Ro0alYIRqh1oH8F/tB911FHpM1k1Cfs58sgjo2nTpik4yR+ERiwtygKV3LCIAGHKlCnprbfZ91kx8cUXX6TgiGoZqi169OgRVHTkVrhQLYMDg4qYe++9tyRo4pgUA1CZQcjEdpw386jo3HHlmLz05fPPP48hQ4akzxHqUDjQsWPH2G233YKWGow333wzrr/++rSMaskll0whEC04OB/Mx48fn6pweLkM58t1JDgjHKK1xvLLLx+DBw+OTp3+r6lyaccfOnRohYELz948c3PuHIPrx7WiCoy5sxRt4sSJaYkQbxqmQikL7b788su44IIL0vdYCjZz5swU8JVW4fL222+n68X5UgHVt2/fVESBDVYnnHBCaiHC97M8YEH/4WhwFS7cpKSUWakaNxAXcf3110+Wl156abqJnn322fR3fiApFXvvvffS37lhSS0JaxwKKNDwBA5+9uAY9d2oennit//t9tiwzYb18tw8KQUUUEABBRq6QHUHLvfff3888MAD6UE6Gzwor7DCCvP008y+V16FC4HJ2muvnV5e8sgjj6QHfpYmbbzxxkHPFp7dXnjhhbQrAhdaSBA88OxGcHDqqadGt27d0n+ejxkzJmgzwejS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dFGqovn73/8+TyBDsJBVVBAQvfvuu/MFLrvssktsvfXWqfqC/bRq1SpuvPHG6roTqvU4BC5//vlnnH/++QYu1SrvwRRQQAEFFFBAAQUUUEABBapHoAYCl2nTpsWvv/4ahx12WBx66KFVDlyoWFlllVVi9913Tw/vVMI8+uijMWfOnBRm/PbbbyUhCoHLtttuG6NGjUrBCNUOAwcOjO+++y6OOuqo9JmsmoT9HHnkkdG0adMUnOQPKlFYWpRVsNx+++3RoUOHtBkBwpQpU+Kaa64p+f5mm20WX3zxRapmoVqGaosePXoEFR25FS5UyxC6MKiIuffee0uCJo559dVXp8oMQia247yZR0XnThURx3z99dfj888/jyFDhqTPEep89tln0bFjx9htt91im222Scd+88034/rrr0/LqJZccskUAh1++OHpfDAfP358qsLp3LlzOt/GjRvHyy+/nMKhH3/8MZZffvkYPHhwdOrUKe2vtOMPHTq0wsCFSpSHH344Vf5wDK4f14olaMx9kUUWiYkTJ6YlQuuuu24K77Lr8OWXX8YFF1yQvsdSsJkzZ6bqltIqXN5+++10vThfKqD69u0b66yzTrLB6oQTTghCOb7PnIoxrHAphqL7UEABBRRQQAEFFFBAAQVqs0ANBC4ZB6EBIUNVK1wITNZee+044ogj4pFHHkkP/HvttVdsvPHGQc+WZ599Nl544YV0OAKXZZZZJgUPhA0EB6eeemp069YtrrzyyhgzZkycdNJJadsuXbrE9ttvHyeffHL6XFkjC1yYP/umAobg4aqrroo111yzJHC5+eabU2DBcaiQISBZaqmlYuzYsaUGLnyfKhiCBebJ4MGfsITAgUGVEJU3HLuQc+czVOtQicPvxx13XKy++uopgJg0aVKaMxU+VNXsuOOOscMOOyQDAo233norzjjjjHQOBC1HH310/PTTT+m4fJ3zHjBgQNp+k002SUHRxx9/HA8++GA0adKkxDA7PgEO14ptevbsWcL7888/x2uvvVaypOi5555LoQohCtZUErFciwCL4xGmMP/VVlstrr322hSWEI7Qc4f7gMCM602PHxz33HPP+QIXgplDDjkkbd+rV6+Se4albFQysT/uF+ZM0EVAWIxh4FIMRfehgAIKKKCAAgoooIACCtRmgXoSuPBg3b59+5IlKllIkBu45PZwIdBo2bJlClXylxRR9cKDPKEG4QuDgIAKBwYBAGFHFrjwwE8lCE18qYpYddVV49JLL03bEyg99NBDaQkSgQmfIdgYNmzYfIFLs2bNUiBCyEEzYfaxwgorpAoPghWOuf7666c5UMmTVdIUcu4s4dl0003TZ2kgy9+pAGHejAsvvDBVkBCC7brrrqhxdKkAACAASURBVKnihcoUQotscHyCJXrLsMQqG1SHvPLKK+mcGJz33nvvnQItKokIrXKPzzb8nUCDwCwbs2bNSl/L7eGCJz1vvv/++3TOe+yxRxx00EEpcOHaUCXFwJiA5/7774+RI0emOVI9RKUTo6weLlwX5n7uueem7aiKInjjnAhuCFw4bq5DMX6cDVyKoeg+FFBAAQUUUEABBRRQQIHaLFBPAhcCCZrwssyGUVHgwlIYHqipHMkPXHh7Estrjj/++BRCMFg2xFIoqlJY3kIoUNqSIpbUEDbQFJclN1ngMn369FRJscEGG6RKDR708ytcqDghgLjvvvtSvxfmxiCAIVhgyRMVH9mgGuWKK65IYUxlzp1wgqqb/N43VKdQwcFyJpb8MNq0aZOW6lAJxNIb3LIlVTQPpjIkq8bhvLLBnHDYZ599UuCS37C4kB4uBEI0NKYxMsueqH7JqqLyAxcqmjgnQh9+3XTTTalaJRtlBS6EQoQ8WOYOvKlCInCh31BV36RV1o++gUtt/kfRuSmggAIKKKCAAgoooIACxRCoJ4ELVQkEEtmyoMoGLlTC5PbnoJojC1ZymXmQf+edd8oMXNi2T58+aQnKdtttVxK4UL3yr3/9K72amqqL0gKXrIdLVqGRvcWJsIYgiWU/uRUh2bwqe+5UdBCAPPnkk/MEOLnnSY8dlvwQRo0bNy6eeOKJVHXzxx9/pAAIL/qrUEVCZQkmVJcwZsyYkapkssCqKoELYQeBDQEPZgz66my44YbJtLzAhQCFY7MsiCVNjLICF95CxZIqrkf+IBAzcCnGPzLuQwEFFFBAAQUUUEABBRRoiAI1ELhQWcIvHqhZtkLvj8UWW6zUKgIemlnOQxPX3EF1BkFD1sMlq2pgKQzBC1UiNMcta0lRboULYQG9Qf75z3+mUIG3DGX9O3jAp9qBRrAslSH04PfcChcqMVgKRNDw4osvpldY06+F5TdZhQuBS+4oL3Bhu6wKhR4p9BZhDix34W1HLOchBGHe7L+y506AQ2UK/VOOOeaY5E5AxTWhWSxLaLg2zZs3T/1YCF0IXDgnlvQQGLHMhz4wLL2hqufss89Of6cZ8F133ZUM+Oyyyy5bpQoXlntxLekbQ3hFs2OWWNGHpaLAhQol7imCHpaGvffee+m6ldY0F0OqXOiNw2c4FypaqOihksfApSH+o+g5K6CAAgoooIACCiiggALFEKiBwIWHWKoHckduv43crxO4lFZ9wPIVlr0QuPBQTkUGD/8EB4Qb9FHhrTzZshIevnlgz3qgELhQrXHWWWeloIFlM7x9h0FYQKNUHsYJGXhNczYIc3iLDU1lsyVFufPl+yzL6d27d8n3qQThTTmVCVzYljfxZG//oeLjnHPOST1issEcCEwqe+58fvTo0alvCwEDg2a4XBf6otCEmKa4DAITwh4a1WJE1QsDH5rr9u/fP/2dUIwmutm+CMPo38LIt+drhSwpuu2220qqZgivCJxYqpQFLlzL7PhcZ6qPsj4yhD3Za74J0AhPSmuay1wItzgWQQ2Da8VSLZr4UinjkqJi/EPjPhRQQAEFFFBAAQUUUECBhiaQG7gs3a6ws580PGLVLSP2e7iw7athK8ITKjWyXhv086A5bPbQXcgUqPxgGRFhQu4g0KBBLeEDlTg1OWjMyzypAMn6uSzIubMvggz2l9unhMCFIIqwIndkx89tmpt9n+/hRPURAU4xBlVDzCW/30wh+6YJL6FJaXPN/zxvhqIxL9c/vxqpkGNVdht7uFRWzO0VUEABBRRQQAEFFFBAgbomkAUulZ13LQtcqNhgWQtv9SEgoc8IFSG8Irq+j4Z87nX12hq41NUr57wVUEABBRRQQAEFFFBAgUIFCFy+HlXo1vNut9mpVfvcX/ApqhmGDx+elv+wJKRr166p70pDGA353Ovq9TVwqatXznkroIACCiiggAIKKKCAAgoooECtFTBwqbWXxokpoIACCiiggAIKKKCAAgoooEBdFTBwqatXznkroIACCiiggAIKKKCAAgoooECtFTBwqbWXxokpoIACCiiggAIKKKCAAgoooEBdFTBwqatXznkroIACCiiggAIKKKCAAgUK/Pu//44xU8YUuPW8mw3oMqBKn/NDCjR0AQOXhn4HeP4KKKCAAgoooIACCihQ7wUIXI548YhKn2eP9j3ipi1vqvTn/IACCkQYuHgXKKCAAgoooIACCiiggAL1XCALXDou1TFaN2ld0NmO/G5kLGjgMn369Pjll1+idevCjlnaxPj8wgsvHIsuumiF837mmWeie/fu0aJFiwq3zd9g7ty5MXXq1PS66SWWWKLSn/cDNS8wYsSIdK+ttNJKMWHChPT68I022qjGJmbgUmP0HlgBBRRQQAEFFFBAAQUUqB6B3MBl+5W3r/CgX/78ZTw14akqBy5TpkyJI444In766ad0rGWWWSb233//2GmnnUo99mOPPRb/+Mc/4vHHH5/v+wceeGCstdZaccopp1Q476222iouueSS6Nq163zbvvrqq/H+++/HoEGD5vnehx9+GJdffnl8/fXXJV8nsNl3333TfL/66qvo16/fPJ9ZccUV4/TTTw9+z76/3HLLxT333FOyHfs99thj08P/Lbfckr7O/mbPnp3+TIi0xhprxGmnnRZ8tj6OM888M53WeeedV3J6kydPDq7prbfemvyKOQ4++ODYYostYr/99os777wzhg8fno5TU8PApabkPa4CCiiggAIKKKCAAgooUE0C1R24UFnw6KOPxs477xxLLrlkevh98skn09dKqx4hcCGUeOqpp+YToVJh8cUXj3bt2lWoVV7gcvfdd8dLL70Ud9xxx3yhyOabb55CAKojvvnmmzQPwpnrrruuJFC5+OKLo23btvHDDz/ERRddlKpo/v73v88TyBAsZBUVBETvvvvufIHLLrvsEltvvXWqvmA/rVq1ihtvvLHCc6uLGxC4/Pnnn3H++ecbuNTFC+icFVBAAQUUUEABBRRQQAEFyheo7sAlfzZZFQihxQYbbDDfZMsLXKhYWWWVVWL33XdPD+9UwhDczJkzJ4UZv/32W0mIQuCy7bbbxqhRo1IwQrXDwIED47vvvoujjjoqfSarJmE/Rx55ZDRt2jQFJ/mDShTCoWzut99+e3To0CFtRoBAFc8111xT8v3NNtssvvjiixQcUS1DtUWPHj2Cio7cCheqZQhdGFTE3HvvvSVBE8e8+uqrU2UGIRPbcd7Mo6Jzp4KIY77++uvx+eefx5AhQ9LnCHU+++yz6NixY+y2226xzTbbpGO/+eabcf3116dlVIRihECHH354Oh/Mx48fn6pwOnfunM63cePG8fLLL6dw6Mcff4zll18+Bg8eHJ06dUr7K+34Q4cOrTBwIYx7+OGHU+UPx+D6ca0a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8svjzDPPjE033bTariWByy233BK33npr/Prrr/Hiiy/GAw88kOay3nrrVds8qutA5QUuv/zyS7pexRwGLsXUdF8KKKCAAgoooIACCiiggAI1LlDdgUv+CY8fPz6OPPLIuOGGG2K11VYrN3B588034+yzz47jjz8+tt1225JtJ0+eHBdddFF89tln0bFjx9htt91im222Sd/ff//9U0XN66+/Hp9//nlQoTF8+PB4+OGHY/bs2dG4ceO0r6OOOioaNWoUHOP666+PqVOnBlUsW2+9dRx++OGRBS5PPfVUyXGpwmDuHI9R3jwmTpyY5sjvSy+9dDRr1iz69OkT22+/fTz++OMxZsyYWGeddYKKnlVWWSVOPvnkePvtt1N1D3Pp2rVr9O3bN21D4EHQ85///Cd+//33dM6DBw+OlVZaKe6555545JFHYubMmdGiRYvo379/9O7dO6ZPnx6XXnppWrbDObN054gjjoiFF144ueFywgknxN13352ORwhWVoVLFriwJOzoo4+OKVOmpPNv165dmvcaa6xRYt+jR49kT0XTFltsEQMHDowlllgi/vzzzxg6dGg8+uij6TowV7YprcKF71999dXpui2++OIprKOyiP2UZVfjP1gVTMAKl9p+hZyfAgoooIACCiiggAIKKLCAAjUVuFBBwdIgQoPNNtssBg0aVOqZZEuKWD5E0EL4kbuMZ+7cubHXXnvF6quvnpb4TJo0Ka666qpURbP88sunpSmMzTffPNq2bZsClPfffz8WWWSRtFSGeVCtcfrpp8dGG20UO+64Y+ywww4pCCEcySov8gOXTz/9NIU0N998c6y88spR3jyWXXbZNMflllsuDjrooDQfjrnnnnumObNs57777kuBxSabbBJt2rSJddddNw455JD0OZZcsaSKMIJ5sJxq2LBhccEFF6TzeOWVV6J79+6x6KKLpsCD4IQ5jR49On777bd0jJNOOinZDBgwIAUq7GPfffdNgdTYsWPTZwgw8CHUIJAhcKGKiIAoGwRSBDvMnxCHwIQwiGNj/vXXX8e9996bNsd+mWWWSYEX+77kkkvi1FNPTdf7ySefTGES4QnH4Ny41qUFLoRBhGV4M7gXDjzwwNhpp51KteP61fZh4FLbr5DzU0ABBRRQQAEFFFBAAQUWUKCmApcPP/ww/vGPfwQVLlRt8FDNQ3v+4CH8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7DhovUp/zg8ooECEgYt3gQIKKKCAAgoooIACCihQzwWywKXZsktE0+aLFXS2//30xzBwKYjKjQoU+P777+Odd96Jv/3tb+kTzz77bGy44YbRsmXLAvdQtzYzcKlb18vZKqCAAgoooIACCiiggAKVFsgNXDp1b1Ph56dPmR2fvvVtUQKXr7/+Og499NDYaqut4oQTTij12M8880xcc8016QE8G/fff3/cdtttcdlll0WXLl0qnHMxNnjsscfiuuuuK9nVkksuGfvtt1/svvvuxdh9rdvHV199Ff369Yvbb789OnToUDK/IUOGxJw5+NN8HAAAIABJREFUc+LCCy8s6pzfeuutOOOMM+KFF15I++We4BiELvVxGLjUx6vqOSmggAIKKKCAAgoooIACOQI1Fbj8/PPP6YH+xx9/jG222abgwOW5556Lyy+/PM4888zYdNNNq+1aErjccsstceutt8avv/4aL774YjzwwANpLuutV/+WVpUXuPzyyy9x8cUXF9XewKWonO5MAQUUUEABBRRQQAEFFFCgpgVqInCZO3duDBo0KFq3bh0EL+3atSsocHnzzTfj7LPPjuOPPz623XbbErrJkyfHRRddFJ999ll07NgxdttttxTiMPbff/84+OCD4/XXX4/PP/88qNAYPnx4PPzwwzF79uxo3Lhx2tdRRx0VjRo1Co5x/fXXx9SpU4Mqlq233joOP/zwyAKXp556quS4VGEceeSR6XiM8uYxceLENEd+X3rppaNZs2bRp0+f2H777ePxxx+PMWPGxDrrrBNU9Kyyyipx8sknx9tvv52qe5hL165do2/fvmkbAg+Cnv/85z/x+++/p3MePHhwrLTSSnHPPffEI488EjNnzowWLVpE//79o3fv3jF9+vS49NJL07IdzpmlO0cccUQsvPDCyQ0XqozuvvvudLzzzz+/zAqXLHCZNm1aHH300TFlypR0/lxH5r3GGmuU2Pfo0SPZ//DDD7HFFlvEwIEDY4kllog///wzhg4dGo8++mi6DsyVbUqrcOH7V199dbpuiy++eOyyyy6psoj9lGVX0z9XFR2/3la4cGG/++67aNWqVSyyyCIVOfh9BRRQQAEFFFBAAQUUUKDeCtRE4HLBBRfEpEmT4sYbb4xTTjmloMCF5UMELYQfuct4CG/22muvWH311dMSH/Z71VVXxR133BHL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Fihw2WOPPeLHH3+c51g777xzDBw4cL7jP/PMM3HNNdekB/Bs3H///XHbbbfFZZddFl26dKlwzsXY4LHHHovrrruuZFdLLrlk7LfffrH77rsXY/e1bh9fffVV9OvXL26//fbo0KFDyfyGDBkSc+bMiQsvvLCoc37rrbfijDPOiBdeeCHtd6uttkrHIHSpj8PApT5eVc9JAQUUUEABBRRQQAEFFMgRqKnAZYsttohtttmmZCbNmjWL5s2bVxi4PPfcc3H55ZfHmWeeGZtuumm1XUsCl1tuuSVuvfXW+PXXX+PFF1+MBx54IM1lvfXWq7Z5VNeBygtcfvnll7j44ouLOhUDl6JyujMFFFBAAQUUUEABBRRQQIGaFqipwGWvvfYqqDokt8LlzTffjLPPPjuOP/742HbbbUvoJk+eHBdddFF89tln0bFjx9htt91Kwpz9998/Dj744Hj99dfj888/Dyo0hg8fHg8//HDMnj07GjdunPZ11FFHRaNGjYJjXH/99TF16tSgimXrrbeOww8/PLLA5amnnio5LlUYRx55ZDoeo7x5TJw4Mc2R35deeukgYOrTp09sv/328fjjj8eYMWNinXXWCc53lVVWiZNPPjnefvvtVN3DXLp27Rp9+/ZN2xB4EPT85z//id9//z2d8+DBg2OllVaKe+65Jx555JGYOXNmtGjRIvr37x+9e/eO6dOnx6WXXpqW7XDOLN054ogjYuGFF05uuJxwwglx9913p+Odf/75ZVa4ZIHLtGnT4uijj44pU6ak82/Xrl2a9xprrJH+jn2PHj2S/Q8//BCEbFQxLbHEEvHnn3/G0KFD49FHH03XgbmyTWkVLnz/6quvTtdt8cUXj1122SXdO+ynLLua/rmq6PhWuFQk5PcVUEABBRRQQAEFFFBAgTouUFOBCw/9K664YrRp0yZ23HHH9OfSRha4sHyIoIXwI3cZz9y5c4PwZvXVV09LfCZNmhRXXXVV3HHHHbH88sunpSmMzTffPNq2bZsClPfffz8WWWSRtFSGSg6qNU4//fTYaKON0lx22GGHFIQQjmSVF/mBy6effppCmptvvjlWXnnlKG8eyy67bJrjcsstFwcddFCaD8fcc88905xZtnPfffelwGKTTTZJJuuuu24ccsgh6XO9evVKS6oII5gHy6mGDRsWF1xwQTqPV155Jbp37x6LLrpo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U0ABBRRQQAEFFFBAAQUUqIIAgcvk8Z9U4ZMRG+++T5U+1xA/9NFHH6XeLVTgdOjQITUJptGso2EK1JrAhbVpvI+ctXH8mWZGBC7Za6N4bReviHIooIACCiiggAIKKKCAAgoooIACtV2g1gQudHqmSRFdlwldtttuuxS4sOaP71155ZXpnd8OBRRQQAEFFFBAAQUUUEABBRRQoLYL1JrAhWZCvM6L94rnBi7Zu8zpSszrtRwKKKCAAgoooIACCiiggAIKKKBAbReoNYELr9fiHdu805tXWlHhwqu9Tj755Jg4cWJ6J7pr32r77eT8FFBAAQUUUEABBRRQQAEFFFAAgVoTuLB06KCDDip5T/uSSy4ZvA6K12oNHjw4Nt98c6+YAgoooIACCiiggAIKKKBAFQR++XRazPnypyp8MmLpLVeo0uf8kAINXaDWBC5ciNmzZ6eGuePGjQveWrTCCivErrvuGp06dWro18nzV0ABBRRQQAEFFFBAAQWqLEDg8v3tH1T684t3ah6t+q1d6c/5AQUUqEUVLnfeeWdMnTo1jj/+eK+LAgoooIACCiiggAIKKKBAEQWywGWRlovHws0WK2jPv06YHsUKXHjWY7Rs2bKgY7tR/RT4/vvvUysR+rcynn322dhwww3r7X1Raypc6NUyffr0uPnmm+vnneVZKaCAAgoooIACCiiggAI1JJAbuDRZf7kKZzF36i8xa/T/Fihw+fPPP+OWW26Jxx9/PObMmRMLL7xwesAubTzzzDNxzTXXzPN9Vj/cdtttcdlll0WXLl0qnHMxNnjsscfiuuuuK9kVrS7222+/2H333Yux+1q3j6+++ir69esXt99+e3To0KFkfkOGDEnX7MILLyzqnN96660444wz4oUXXkj7pW8rxyB0qY+j1gQu9913X1Dl8uSTT8YiiyxSH609JwUUUEABBRRQQAEFFFCgRgRqInC5/PLL45VXXom+ffuml6LwAN+mTZuCApfnnnsu+PyZZ54Zm266abWZEbgQEt16663x66+/xosvvhgPPPBAmst6661XbfOorgOVF7jQU/Xiiy8u6lQMXIrKWfjOPv/88zjqqKNixx13jN69e8/3wTXWWMO3FBXO6ZYKKKCAAgoooIACCiigQIlAdQcu//vf/2LfffeNI444Ivr06VPhlcitcHnzzTfTm2tpN7HtttuWfHby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JHSfPn1i4MCB9VslMydAgAABAgQIECBAgAABAgRyJbDVA5dcaRksAQIECBAgQIAAAQIECBAgQKAZAgKXZiA5hQABAgQIECBAgAABAgQIECBQioDApRQt5xIgQIAAAQIECBAgQIAAAQIEmiEgcGkGklMIECBAgAABAgQIECBAgAABAqUICFxK0XIuAQIECBAgQIAAAQIECBAgQKAZAgKXZiA5hQABAgQIECBAgAABAgQIECBQioDApRQt5xIgQIAAAQIECBAgQIAAAQIEmiEgcGkGklMIECBAgAABAgQIECBAgAABAqUICFxK0XIuAQIECBAgQIAAAQIECBAgQKAZAgKXZiA5hQABAgQIECBAgAABAgQIECBQioDApRQt5xIgQIAAAQIECBAgQIAAAQIEmiEgcGkGklMIECBAgAABAgQIECBAgAABAqUICFxK0XIuAQIECBAgQIAAAQIECBAgQKAZAgKXZiA5hQABAgQIECBAgAABAgQIECBQioDApRQt5xIgQIAAAQIECBAgQIAAAQIEmiEgcGkGklMIECBAgAABAgQIECBAgAABAqUICFxK0XIuAQIECBAgQIAAAQIECBAgQKAZAgKXZiA5hQABAgQIECBAgAABAgQIECBQioDApRQt5xIgQIAAAQIECBAgQIAAAQIEmiFQt4HL6tWrY8mSJdGlS5do0aJFM6icQoAAAQIECBAgQIAAAQIECBBonkDdBS7r1q2LO+64Ix555JFMqHXr1nHdddfFwQcfvFmxJ598MsaMGbPJazNnzow2bdo0T9lZBAgQIECAAAECBAgQIECAQF0J1F3g8sc//jFGjBgRo0ePjgMPPDBuvfXWmD9/fjz66KObXekyd+7cGDduXNx1110bXBi77LKLlTF19VfFZAkQIECAAAECBAgQIECAQPMF6i5wuemmm+L111+Pe+65J1P64IMPon///nHLLbfEfvvtt4lcClxSKDNr1qzmqzqTAAECBAgQIECAAAECBAgQqGuBugtcLr/88ujQoUP89Kc/bSx8nz594sorr4xjjjlms4HLjTfeGEcccUR2+9Hhhx8exx9/fLRq1aquLxyTJ0CAAAECBAgQIECAAAECBL5YoO4Cl8GDB8eee+4Zw4cPb1RJAcqQIUPi5JNP3kTq5ZdfjrTKZYcddoiFCxfG888/H717946rr746O3fVqlWuLwIECBAgQIAAAQIECJQkYD/IkricTCCXAnUXuKQVLjvuuGNcddVVjQVLK1zS10cffXSTRZwxY0a2n8vs2bOzVS4rVqxo8j1OIECAAAECBAgQIECAwPoC7dq1A0KAQMEF6i5wSXu4vPHGG3H33XdnpV20aFEMGDDgC/dw2bj+aYPdUaNGxeOPPx5t27Yt+OVhegQIECBAgAABAgQIECBAgMCWCNRd4PKHP/whRo4cGddff30cdNBBcfPNN2e3CTU8pWjSpEnx29/+NiZPnpx53nfffbH33nvH/vvvH0uXLo0rrrgi28tl4sSJW+LtPQQIECBAgAABAgQIECBAgEAdCNRd4LJu3boYP358PPbYY1l5W7ZsGTfccEMccsgh2ddjxoyJefPmxZw5c7Kvx44d2/jf6evu3bvHtddeGz179qyDy8MUCRAgQIAAAQIECBAgQIAAgS0RqLvApQFp5cqV8dFHH0W3bt2iRYsW/9Yunbt48eJo3759dOzYcUucvYcAAQIECBAgQIAAAQIECBCoI4G6DVzqqMamSoAAAQIECBAgQIAAAQIECFRZQOBSZXDdESBAgAABAgQIECBAgAABAsUXELgUv8ZmSIAAAQIECBAgQIAAAQIECFRZQOBSZXDdESBAgAABAgQIECBAgAABAsUXELgUv8ZmSIAAAQIECBAgQIAAAQIECFRZQOBSZXDdESBAgAABAgQIECBAgAABAsUXELgUv8ZmSIAAAQIECBAgQIAAAQIECFRZQOBSZXDdESBAgAABAgQIECBAgAABAsUXELgUv8ZmSIAAAQIECBAgQIAAAQIECFRZQOBSZXDdESBAgAABAgQIECBAgAABAsUXELgUv8ZmSIAAAQIECBAgQIAAAQIECFRZQOBSZXDdESBAgAABAgQIECBAgAABAsUXELgUv8ZmSIAAAQIECBAgQIAAAQIECFRZQOBSZXDdESBAgAABAgQIECBAgAABAsUXELgUv8ZmSIAAAQIECBAgQIAAAQIECFRZQOBSZXDdESBAgAABAgQIECBAgAABAsUXELgUv8ZmSIAAAQIECBAgQIAAAQIECFRZQOBSZXDdESBAgAABAgQIECBAgAABAsUXELgUv8ZmSIAAAQIECBAgQIAAAQIECFRZQOBSZXDdESBAgAABAgQIECBAgAABAsUXELgUv8ZmSIAAAQIECBAgQIAAAQIECFRZQOBSZXDdESBAgAABAgQIECBAgAABAsUXELgUv8ZmSIAAAQIECBAgQIAAAQIECFRZQOBSZXDdESBAgAABAgQIECBAgAABAsUXELgUv8ZmSIAAAQIECBAgQIAAAQIECFRZQOBSZXDdESBAgAABAgQIECBAgAABAsUXELgUv8ZmSIAAAQIECBAgQIAAAQIECFRZQOBSZXDdESBAgAABAgQIECBAgAABAsUXELgUv8ZmSIAAAQIECBAgQIAAAQIECFRZQOBSZXDdESBAgAABAgQIECBAgAABAsUXELgUv8ZmSIAAAQIECBAgQIAAAQIECFRZQOBSZXDdESBAgAABAgQIECBAgAABAsUXELgUv8ZmSIAAAQIECBAgQIAAAQIECFRZQOBSZXDdESBAgAABAgQIECBAgAABAsUXELgUv8ZmSIAAAQIECBAgQIAAAQIECFRZQOBSZXDdESBAgAABAgQIECBAgAABAsUXELgUv8ZmSIAAAQIECBAgQIAAAQIECFRZQOBSZXDdESBAgAABAgQIECBAgAABAsUXELgUv8ZmSIAAAQIECBAgQIAAAQIECFRZQOBSZXDdESBAgAABAgQIECBAgAABAsUXELgUv8ZmSIAAAQIECBAgQIAAAQIECFRZQOBSZXDdESBAgAABAgQIECBAgAABAsUXELgUv8ZmSIAAAQIECBAgQIAAAQIECFRZQOBSZXDdESBAgAABAgQIECBAgAABAsUXELgUv8ZmSIAAAQIECBAgQIAAAQIECFRZQOBSZXDdESBAgAABAgQIECBAgAABAsUXELgUv8ZmSIAAAQIECBAgQIAAAQIECFRZQOBSZXDdESBAgAABAgQIECBAgAABAsUXELgUv8ZmSIAAAQIECBAgQIAAAQIECFRZQOBSZXDdESBAgAABAgQIECBAgAABAsUXELgUv8ZmSIAAAQIECBAgQIAAAQIECFRZQOBSZXDdESBAgAABAlsmsGrFmvjvBZ9s2Ztr/F2tt20VnXq2r/FRfvnhLXj1L1++kRptoce++9foyMo3rH++tCjWLllVvgZrqKV2h3WJVh3b1tCIDIUAgSIICFyKUEVzIECAAIFmCSwePz4+HD+hWefm7aROQy6JzkOG5G3YJY134etL4pFxfyzpPXk5ufteO8ZpPz40L8Pd4nGO7XfyFr+31t84bOrMWh/ilx7f4nv+X6x6a9mXbqcWG+h80YHRZvcOtTg0YyJAIMcCApccF8/QCRAgQKA0AYFLaV61dvaH734S/zXt9VobVlnG07nH9vGf39+zLG3VciNTf/aTWh7elxpbv/87+ku9Pw9v/p8VLivzMNSSx9jusK5WuJSs5g0ECDQlIHBpSsjrBAgQIECAAAECBAgQIECAAIESBQQuJYI5nQABAgQIECBAgAABAgQIECDQlIDApSkhrxMgQIAAAQIECBAgQIAAAQIEShQQuJQI5nQCBAgQIECAAAECBAgQIECAQFMCApemhLxOgAABAgQIECBAgAABAgQIEChRQOBSIpjTCRAgQIAAAQIECBAgQIAAAQJNCQhcmhLyOgECBAgQIECAAAECBAgQIECgRAGBS4lgTidAgAABAgQIECBAgAABAgQINCUgcGlKyOsECBAgQIAAAQIECBAgQIAAgRIFBC4lgjmdAAECBAgQIECAAAECBAgQINCUgMClKSGvEyBAgAABAgQIECBAgAABAgRKFBC4lAjmdAIECBAgQIAAAQIECBAgQIBAUwICl6aEvE6AAAECBAgQIECAAAECBAgQKFFA4FIimNMJECBAgAABAgQIECBAgAABAk0JCFyaEvI6AQIECBAgQIAAAQIECBAgQKBEAYFLiWBOJ0CAAAECBAgQIECAAAECBAg0JSBwaUrI6wQIECBAgAABAgQIECBAgACBEgUELiWCbe3TFyz5NKa/tGBrD6Mi/ffouG2ccViPirStUQIECBAgQIAAAQIECBAgUE0BgUs1tcvQ1wtv/Xecdc8LZWip9pr4P7v/R0y9qFftDcyICBAgQIAAAQIECBAgQIBAiQIClxLBtvbp/7PC5d2tPYyK9N+jYzsrXCoiq1ECBAgQIECAAAECBAgQqLZAYQOXdevWxaJFi6JTp07RqlWrarvqjwABAgQIECBAgAABAgQIEKhjgUIGLs8++2yMHj061q5dm5V24MCB0a9fvybLvGDBguzcPn36xLBhw7Lzn3zyyRgzZswm7505c2a0adOmyTadQIAAAQIECBAgQIAAAQIECNSfQOECl08//TROO+20OOuss2LAgAExb968uPHGG2PSpEnRs2fPL6zw8uXL48ILL4ylS5fG8ccf3xi4zJ07N8aNGxd33XXXBu/dZZddokWLFvV3xZgxAQIECBAgQIAAAQIECBAg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AQIECBAgQIAAgTILCFzKDKo5AgQIECBAgAABAgQIECBAgIDAxTVAgAABAgQIECBAgAABAgQIECizgMClzKCaI0CAAAECBAgQIECAAAECBAgIXFwDBAgQIECAAAECBAgQIECAAIEyCwhcygyqOQIECBAgQIAAAQIECBAgQICAwMU1QIAAAQIECBAgQIAAAQIECBAos4DApcygmiNAgAABAgQIECBAgAABAgQICFxcAwQIECBAgAABAgQIECBAgACBMgsIXMoMqjkCBAgQIECAAAECBAgQIECAgMDFNUCAAAECBAgQIECAAAECBAgQKLOAwKXMoJojQIAAAQIECBAgQIAAAQIECAhcXAMECBAgQIAAAQIECBAgQIAAgTILCFzKDKo5AgQIECBAgAABAgQIECBAgIDAxTVAgAABAgQIECBAgAABAgQIECizgMClzKCaI0CAAIH8CixfvjxefPHFaNu2bRx11FEbTGTVqlXx3HPPZX923HHHbfEkFy1aFMOHD48RI0bEAQcc0GQ7K1eujEGDBmX/6927d5PnO4EAAQIECBAgQKA2BAQutVEHoyBAgACBGhB49dVX49JLL81GMmHChNhrr70aRzV9+vS4++67s6+feOKJ2GabbbZoxO+8804MHDgwfvazn8WRRx7ZZBsrVqyIU089NYYMGZL9v4MAAQIECBAgQCAfAgKXfNTJKAkQIECgCgLrBy6HHnpo/PznP896/fzzz+N73/te/POf/xS4VKEOuiBAgAABAgQIFEFA4FKEKpoDAQIECJRFoCFwOeGEE2L27NkxceLE2HXXXePJJ5+MMWPGZLcSPf300xuscHnsscfiV7/6VXz00Uex0047Rf/+/eOUU05pHM/SpUvjxhtvjJdeein7s+7du8e77767wQqXt99+O8aOHRtvvPFGtGzZMg466KDstqPUnhUuZSmtRggQIECAAAECVRcQuFSdXIcECBAgUKsCDYHLuHHj4uqrr46DDz44rrnmmixESSFIx44d46GHHmoMXGbOnBm33npr7L777tGnT58smHnrrbey25JOPvnkWLduXQwYMCA++OCD+OY3vxmHH354/P73v8/2iWm4pSi9ltrv0aNH9O3bN5YsWRLTpk2LnXfeOe68806BS61eLMZFgAABAgQIEGhCQODiEiFAgAABAv8SaAhcUojy2muvZYFH2jtl/Pjxcd9998Xjjz++QeBy+umnR5s2beL+++9vNOzXr1+sWbMmZsyYEfPnz49Ro0bF0KFDG1e9bLyHS1o5M2/evHj44YejXbt2WTsPPPBATJo0KR588MHYdttt7eHiCiVAgAABAgQI5FBA4JLDohkyAQIECFRGYP3AZY899ojTTjstVq9enT2xKK10SbcYNaxw+eyzz7JVLOn2ox//+MeNA0q3Bs2ZMydmzZoVv/zlL2Pq1KlZgNKpU6fsnI0DlwsvvDC7xahz586NbaTbiNJ+MTfffHO2esamuZWpt1YJECBAgAABApUUELhUUlfbBAgQIJArgfUDl3333TcmT54cU6ZMadzLZf3AJYUiKZA544wzYvDgwY3zvOOOO+LXv/51pL1d0lONUvCS9oNp1arVZgOXdDtReuJRenLRxschhxySvU/gkqvLyGAJECBAgAABApmAwMWFQIAAAQIE/iWwceCyatWqWLhwYbbKJB3rBy4pJDnppJOia9eu2e0/DccFF1yQ7dmSgpZ0S9C9994bt9xyS+y3337ZKWmD3EGDBjXu4XLVVVfFyy+/nK2ESbcPNRxp/5cWLVrYw8XVSYAAAQIECBDIqYDAJaeFM2wCBAgQKL/AxoHLxj1sHLikFSzTp0/Pbi361re+FU899VSkjXS///3vZ6HK+++/H+eee252u9D555+fNZdWzSxevLgxcHnllVfisssuiz333DMuuuii2H777eOvf/1rti/MhAkTsj1irHApf621SIAAAQIECBCotIDApdLC2idAgACB3Ag0BC633XZb7LPPPpuMe+PAJe3vctNNN8UzzzzTeO6xxx4bw4YNi9atW2d/lm4tuv322xtf/8Y3vpE9pShtpturV6/sz9PmuunJSGnfloYj7SGT/iwd6THT62+8mxtQAyVAgAABAgQI1LGAwKWOi2/qBAgQIFAegU8//TTee++96Nat2wa3BTW0vnLlyuz1r33ta41BzOZ6XrZsWSxfvjy6dOnyb88rz6i1QoAAAQIECBAgUEkBgUsldbVNgAABAgQIECBAgAABAgQI1KWAwKUuy27SBAgQIECAAAECBAgQIECAQCUFBC6V1NU2AQIECBAgQIAAAQIECBAgUJcCApe6LLtJEyBAgAABAgQIECBAgAABApUUELhUUlfbBAgQIECAAAECBAgQIECAQF0KCFzqsuwmTYAAAQIECBAgQIAAAQIECFRSQOBSSV1tEyBAgAABAgQIECBAgAABAnUpIHCpy7KbNAECBAgQIECAAAECBAgQIFBJAYFLJXW1TYAAAQIECBAgQIAAAQIECNSlgMClLstu0gQIECBAgAABAgQIECBAgEAlBQQuldTVNgECBAgQIECAAAECBAgQIFCXAgKXuiy7SRMgQIAAAQIECBAgQIAAAQKVFBC4VFJX2wQIECBAgAABAgQIECBAgEBdCghc6rLsJk2AAAECBAgQIECAAAECBAhUUkDgUkldbRMgQIAAAQIECBAgQIAAAQJ1KSBwqcuymzQBAgQIECBAgAABAgQIECBQSQGBSyV1tU2AAAECBAgQIECAAAECBAjUpYDApS7LbtIECBAgQIAAAQIECBAgQIBAJQUELpXU1TYBAgQIECBAgAABAgQIECBQlwICl7osu0kTIECAAAECBAgQIECAAAEClRQQuFRSV9sECBAgQIAAAQIECBAgQIBAXQoIXOqy7CZNgAABAgQIECBAgAABAgQIVFJA4FJJXW0TIECAAAECBAgQIECAAAECdSkgcKnLsps0AQIECBAgQIAAAQIECBAgUEkBgUsldbVNgAABAgQIECBAgAABAgQI1KWAwKUuy27SBAgQIECAAAECBAgQIECAQCUFBC6V1NU2AQIECBAgQIAAAQIECBAgUJcC/x+A0P17WEUE+QAAAABJRU5ErkJggg==", + "text/html": [ + "
" ] }, - "execution_count": 11, "metadata": {}, - "output_type": "execute_result" + "output_type": "display_data" } ], "source": [ - "X_train" + "fig = common.plot_all_scores(\n", + " contender_results=data.contender_results,\n", + "# dir=f'/tmp/results/{run_id}',\n", + " dir=f'/Users/fwhigh/repos/metaflow-helper/examples/model-tournament/results/{run_id}',\n", + " auto_open=False,\n", + ")\n", + "fig.show()\n" ] }, { "cell_type": "code", "execution_count": null, - "id": "6590bbd1-9cb2-4da8-82cc-23b8ca3c3ab7", + "id": "a1d94618-785b-46ae-963f-d4a0f8257c64", "metadata": {}, "outputs": [], "source": [] diff --git a/examples/model-tournament/train.py b/examples/model-tournament/train.py index eef188f..42ec34a 100644 --- a/examples/model-tournament/train.py +++ b/examples/model-tournament/train.py @@ -4,13 +4,16 @@ from pathlib import Path from scipy import stats import numpy as np -from metaflow import FlowSpec, step, Parameter, current +from metaflow import FlowSpec, step, current from sklearn.model_selection import train_test_split, ParameterGrid, KFold from sklearn.metrics import r2_score -import config -import common from metaflow_helper.constants import RunMode +from metaflow_helper.utils import import_object_from_string +from metaflow_helper.plot import plot_predicted_vs_true + +import config +import common class Train(FlowSpec): @@ -50,7 +53,7 @@ def foreach_fold(self): common.install_dependencies(config.dependencies) self.fold = self.input contender = self.contender - fit_kwargs = contender['__fit_kwargs'] + model_fit_kwargs = common.parse_contender_model_fit(contender) X = self.df.loc[self.train_validation_index, :] y = self.df.loc[self.train_validation_index, 'target'] @@ -62,7 +65,6 @@ def foreach_fold(self): y_train = y.iloc[train] X_test = X.iloc[test, :] y_test = y.iloc[test] - preprocessor_pipeline = common.build_preprocessor_pipeline( numeric_features=self.numeric_features, categorical_features=self.categorical_features, @@ -72,16 +74,17 @@ def foreach_fold(self): contender = common.update_contender(contender, mode=RunMode.TEST, input_dim=X_train_transformed.shape[1]) - model_handler_class = common.import_object_from_string(contender['__model']) + model_handler_class = import_object_from_string(contender['__model']) + model_init_kwargs = common.parse_contender_model_init(contender) model_pipeline = common.build_model_pipeline( - model=model_handler_class(**common.parse_contender_model_init(contender)), + model=model_handler_class(**model_init_kwargs), ) model_pipeline.fit( X_train_transformed, y_train, model__validation_data=(X_test_transformed, y_test), - **fit_kwargs, + **model_fit_kwargs, ) self.score = r2_score(y_test, model_pipeline.predict(X_test_transformed)) self.iterations = model_pipeline.named_steps['model'].iterations @@ -122,13 +125,12 @@ def train_test(self): print(f'best_contender {self.best_contender}, contender_results {self.contender_results[self.best_contender_ser]}') self.best_iterations = round(self.contender_results[self.best_contender_ser]['mean_iteration']) contender = self.best_contender - fit_kwargs = contender['__fit_kwargs'] + model_fit_kwargs = common.parse_contender_model_fit(contender) X_train = self.df.loc[self.train_validation_index, :] y_train = self.df.loc[self.train_validation_index, 'target'] X_test = self.df.loc[self.test_index, :] y_test = self.df.loc[self.test_index, 'target'] - preprocessor_pipeline = common.build_preprocessor_pipeline( numeric_features=self.numeric_features, categorical_features=self.categorical_features, @@ -140,19 +142,19 @@ def train_test(self): contender, mode=RunMode.TEST, input_dim=X_train_transformed.shape[1], ) - model_handler_class = common.import_object_from_string(contender['__model']) - + model_handler_class = import_object_from_string(contender['__model']) + model_init_kwargs = common.parse_contender_model_init(contender) model_pipeline = common.build_model_pipeline( - model=model_handler_class(**common.parse_contender_model_init(contender)), + model=model_handler_class(**model_init_kwargs), ) model_pipeline.fit( X_train_transformed, y_train, model__validation_data=(X_test_transformed, y_test), - **fit_kwargs, + **model_fit_kwargs, ) y_test_pred = model_pipeline.predict(X_test_transformed) - model_pipeline.named_steps['model'].plot( + plot_predicted_vs_true( dir=f"results/{current.run_id}", y_true=y_test, y_pred=y_test_pred, @@ -166,11 +168,10 @@ def train_test(self): def train(self): common.install_dependencies(config.dependencies) contender = self.best_contender - fit_kwargs = contender['__fit_kwargs'] + model_fit_kwargs = common.parse_contender_model_fit(contender) X = self.df.loc[:, :] y = self.df.loc[:, 'target'] - preprocessor_pipeline = common.build_preprocessor_pipeline( numeric_features=self.numeric_features, categorical_features=self.categorical_features, @@ -181,13 +182,12 @@ def train(self): contender, mode=RunMode.TRAIN, input_dim=X_transformed.shape[1], best_iterations=self.best_iterations, ) - - model_handler_class = common.import_object_from_string(contender['__model']) - + model_init_kwargs = common.parse_contender_model_init(contender) + model_handler_class = import_object_from_string(contender['__model']) model_pipeline = common.build_model_pipeline( - model=model_handler_class(**common.parse_contender_model_init(contender)), + model=model_handler_class(**model_init_kwargs), ) - model_pipeline.fit(X_transformed, y, **fit_kwargs) + model_pipeline.fit(X_transformed, y, **model_fit_kwargs) self.next(self.end) @@ -208,6 +208,11 @@ def end(self): print(f'contender:\n{json.dumps(contender, indent=indent)}', file=f) print(f'results:\n{json.dumps(v, indent=indent)}', file=f) print('\n', file=f) + common.plot_all_scores( + contender_results=self.contender_results, + dir=results_dir, + ) + if __name__ == '__main__': Train() diff --git a/metaflow_helper/model_handlers/base.py b/metaflow_helper/model_handlers/base.py index 2f02976..cc1c021 100644 --- a/metaflow_helper/model_handlers/base.py +++ b/metaflow_helper/model_handlers/base.py @@ -1,11 +1,3 @@ -import random -from pathlib import Path -import numpy as np -import pandas as pd -import plotly.graph_objects as go -import plotly - - class BaseModelHandler: def __init__(self): pass @@ -29,36 +21,3 @@ def _validate_init_kwargs(self): def _validate_fit_kwargs(self): pass - - def plot(self, y_true, y_pred, dir='.', auto_open=True): - Path(dir).mkdir(parents=True, exist_ok=True) - if len(y_true) > 1_000: - idx = random.sample(range(len(y_true)), 1_000) - else: - idx = list(range(len(y_true))) - x = y_pred.iloc[idx] if isinstance(y_pred, pd.Series) else y_pred[idx] - y = y_true.iloc[idx] if isinstance(y_true, pd.Series) else y_true[idx] - plot_range = [np.min((x, y)), np.max((x, y))] - fig = go.Figure() - fig.add_trace( - go.Scatter( - x=x, - y=y, - mode='markers', - ), - ) - fig.add_shape( - type="line", - x0=plot_range[0], y0=plot_range[0], x1=plot_range[1], y1=plot_range[1], - line=dict( - color="Black", - width=2, - ) - ) - fig.update_layout( - xaxis_title='Predicted', - yaxis_title='True', - template='none', - ) - fig.write_image(f"{dir}/predicted-vs-true.png") - plotly.offline.plot(fig, filename=f"{dir}/predicted-vs-true.html", auto_open=auto_open) diff --git a/metaflow_helper/model_handlers/keras.py b/metaflow_helper/model_handlers/keras.py index f817567..36c7eaa 100644 --- a/metaflow_helper/model_handlers/keras.py +++ b/metaflow_helper/model_handlers/keras.py @@ -1,11 +1,12 @@ from sklearn.base import BaseEstimator, RegressorMixin from tensorflow.python.keras.callbacks import EarlyStopping from tensorflow.python.keras import Sequential -from tensorflow.python.keras.layers import Dense, Dropout, Input +from tensorflow.python.keras.layers import Dense, Dropout, InputLayer from tensorflow.python.keras import regularizers from ..constants import RunMode from .base import BaseModelHandler +from ..utils import import_object_from_string class KerasRegressorHandler(BaseModelHandler, BaseEstimator, RegressorMixin): @@ -17,29 +18,31 @@ def __init__(self, build_model=None, input_dim=None, mode=RunMode, iterations=No self.min_delta = 0 self.patience = None self.callbacks = None - self.eval_metric = eval_metric + self.monitor = eval_metric self.history = [] self.iterations = iterations + self.verbose = 0 self._validate_init_kwargs() - self.model = self.build_model(input_dim=self.input_dim, **kwargs) + self.model = import_object_from_string(self.build_model)(input_dim=self.input_dim, **kwargs) - def fit(self, X, y, validation_data=None, patience=None, min_delta=0, eval_metric=None, **kwargs): + def fit(self, X, y, validation_data=None, patience=None, min_delta=0, monitor=None, **kwargs): kwargs = dict(kwargs) self.patience = patience self.min_delta = min_delta if self.iterations is not None: kwargs['epochs'] = self.iterations + if 'verbose' in kwargs: + self.verbose = kwargs['verbose'] if self.mode is RunMode.TEST: - self.eval_metric = eval_metric + self.monitor = monitor if self.patience is None: ValueError(self.patience) self.callbacks = [ EarlyStopping( - monitor=self.eval_metric, + monitor=self.monitor, min_delta=self.min_delta, - mode='min', - verbose=1, + verbose=self.verbose, patience=self.patience, ), ] @@ -77,7 +80,7 @@ def build_keras_regression_model(input_dim=None, dense_layer_widths=(10,), dropo if len(dense_layer_widths) > len(l2_lambdas): dropout_probabilities = tuple([l2_lambdas[0]]*len(dense_layer_widths)) model = Sequential() - model.add(Input(shape=(input_dim, ))) + model.add(InputLayer(input_shape=(input_dim, ))) for i, params in enumerate(zip(dense_layer_widths, dropout_probabilities, l1_lambdas, l2_lambdas)): dense_layer_width, dropout_probability, l1_lambda, l2_lambda = params model.add(Dense( diff --git a/metaflow_helper/plot.py b/metaflow_helper/plot.py new file mode 100644 index 0000000..7724bd9 --- /dev/null +++ b/metaflow_helper/plot.py @@ -0,0 +1,40 @@ +import random +from pathlib import Path +import numpy as np +import pandas as pd +import plotly.graph_objects as go +import plotly + + +def plot_predicted_vs_true(self, y_true, y_pred, dir='.', auto_open=True): + Path(dir).mkdir(parents=True, exist_ok=True) + if len(y_true) > 1_000: + idx = random.sample(range(len(y_true)), 1_000) + else: + idx = list(range(len(y_true))) + x = y_pred.iloc[idx] if isinstance(y_pred, pd.Series) else y_pred[idx] + y = y_true.iloc[idx] if isinstance(y_true, pd.Series) else y_true[idx] + plot_range = [np.min((x, y)), np.max((x, y))] + fig = go.Figure() + fig.add_trace( + go.Scatter( + x=x, + y=y, + mode='markers', + ), + ) + fig.add_shape( + type="line", + x0=plot_range[0], y0=plot_range[0], x1=plot_range[1], y1=plot_range[1], + line=dict( + color="Black", + width=2, + ) + ) + fig.update_layout( + xaxis_title='Predicted', + yaxis_title='True', + template='none', + ) + fig.write_image(f"{dir}/predicted-vs-true.png") + plotly.offline.plot(fig, filename=f"{dir}/predicted-vs-true.html", auto_open=auto_open) diff --git a/metaflow_helper/utils.py b/metaflow_helper/utils.py new file mode 100644 index 0000000..6ee375b --- /dev/null +++ b/metaflow_helper/utils.py @@ -0,0 +1,8 @@ +from importlib import import_module + + +def import_object_from_string(path): + path, obj_str = path.rsplit('.', 1) + module_ = import_module(path) + obj = getattr(module_, obj_str) + return obj