From 49ffef064c2d57860cbfcc24279461daf50ef6bd Mon Sep 17 00:00:00 2001 From: Theo Cole Date: Wed, 12 Sep 2018 16:39:37 +0100 Subject: [PATCH 01/10] binning and chunking of IR list --- .../database_utils/multiple_case_adder.py | 80 +++++++++++++------ 1 file changed, 55 insertions(+), 25 deletions(-) diff --git a/gelweb/gel2mdt/database_utils/multiple_case_adder.py b/gelweb/gel2mdt/database_utils/multiple_case_adder.py index 5773c254..49dc22b9 100755 --- a/gelweb/gel2mdt/database_utils/multiple_case_adder.py +++ b/gelweb/gel2mdt/database_utils/multiple_case_adder.py @@ -55,7 +55,7 @@ def __init__(self, sample_type, head=None, test_data=False, skip_demographics=Fa :param sample: If you want to add a single sample, set this the GELID :param pullt3: Boolean to pull t3 variants """ - logger.info("Initialising a MultipleCaseAdder.") + print("Initialising a MultipleCaseAdder.") if sample_type == "cancer" or sample_type == "raredisease": pass @@ -82,11 +82,11 @@ def __init__(self, sample_type, head=None, test_data=False, skip_demographics=Fa self.sample_type = sample_type if self.test_data: - logger.info("Fetching test data.") + print("Fetching test data.") # set list_of_cases to test zoo self.list_of_cases = self.fetch_test_data() self.cases_to_poll = None - logger.info("Fetched test data.") + print("Fetched test data.") self.cases_to_add = self.check_cases_to_add() self.cases_to_update = self.check_cases_to_update() # self.cases_to_skip = set(self.list_of_cases) - \ @@ -101,31 +101,61 @@ def __init__(self, sample_type, head=None, test_data=False, skip_demographics=Fa self.cases_to_skip = [] else: # set list_of_cases to cases of interest from API - logger.info("Fetching live API data.") - logger.info("Polling for list of available cases...") + print("Fetching live API data.") + print("Polling for list of available cases...") interpretation_list_poll = InterpretationList(sample_type=sample_type) - logger.info("Fetched available cases") + cases_fetched = len(interpretation_list_poll.cases_to_poll) + print("Fetched", cases_fetched, "available cases") - logger.info("Determining which cases to poll...") - self.cases_to_poll = interpretation_list_poll.cases_to_poll - if head: - self.cases_to_poll = self.cases_to_poll[:head] - - logger.info("Fetching API JSON data for cases to poll...") - self.list_of_cases = self.fetch_api_data() + print("Determining which cases to poll...") + # reverse update, do the newest first! + self.total_cases_to_poll = interpretation_list_poll.cases_to_poll[::-1] if head: - # take a certain number of cases off the top - self.list_of_cases = self.list_of_cases[:head] - - logger.info("Fetched all required CIP API data.") - - logger.info("Checking which cases to add.") - self.cases_to_add = self.check_cases_to_add() - logger.info("Checking which cases require updating.") - self.cases_to_update = self.check_cases_to_update()# - self.cases_to_skip = set(self.list_of_cases) - \ - set(self.cases_to_add) - \ - set(self.cases_to_update) + self.total_cases_to_poll = self.total_cases_to_poll[:head] + self.num_cases_to_poll = len(self.total_cases_to_poll) + + # work out how many hundreds in fetched cases + num_full_bins = self.num_cases_to_poll // 100 + num_bins = num_full_bins + 1 + final_bin_size = self.num_cases_to_poll - (num_full_bins * 100) + print(num_bins, final_bin_size) + + bins = [] + for i in range(num_full_bins): + bins.append( + [ + (100*i) + 1, + (100*i) + 100 + ] + ) # [0, 100], [101, 200] etc + bins.append([num_full_bins + 1, None]) + + bin_count = 1 + for b in bins: + print("Fetching cases for bin", bin_count, "of", len(bins)) + self.cases_to_poll = self.total_cases_to_poll[b[0]: b[1]] + + print("Fetching API JSON data for cases to poll...") + self.list_of_cases = self.fetch_api_data() + if head: + # take a certain number of cases off the top + self.list_of_cases = self.list_of_cases[:head] + print("Fetched all required CIP API data.") + print("Checking which cases to add.") + self.cases_to_add = self.check_cases_to_add() + print("Checking which cases require updating.") + self.cases_to_update = self.check_cases_to_update()# + self.cases_to_skip = set(self.list_of_cases) - \ + set(self.cases_to_add) - \ + set(self.cases_to_update) + print("Finished processing bin", bin_count, "of", len(bins)) + + for case in self.cases_to_add: + del case + for case in self.cases_to_update: + del case + + bin_count += 1 def update_database(self): # begin update process From b97b855101ec696d3952b91c00973a458795409a Mon Sep 17 00:00:00 2001 From: Theo Cole Date: Thu, 13 Sep 2018 09:00:06 +0100 Subject: [PATCH 02/10] bugfixes for memory saving code --- gelweb/gel2mdt/database_utils/multiple_case_adder.py | 9 +++++---- gelweb/gel2mdt/management/commands/run_batch_update.py | 1 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gelweb/gel2mdt/database_utils/multiple_case_adder.py b/gelweb/gel2mdt/database_utils/multiple_case_adder.py index 49dc22b9..ae2b64fe 100755 --- a/gelweb/gel2mdt/database_utils/multiple_case_adder.py +++ b/gelweb/gel2mdt/database_utils/multiple_case_adder.py @@ -118,21 +118,20 @@ def __init__(self, sample_type, head=None, test_data=False, skip_demographics=Fa num_full_bins = self.num_cases_to_poll // 100 num_bins = num_full_bins + 1 final_bin_size = self.num_cases_to_poll - (num_full_bins * 100) - print(num_bins, final_bin_size) bins = [] for i in range(num_full_bins): bins.append( [ - (100*i) + 1, + (100*i), (100*i) + 100 ] ) # [0, 100], [101, 200] etc - bins.append([num_full_bins + 1, None]) + bins.append([num_full_bins * 100, None]) bin_count = 1 for b in bins: - print("Fetching cases for bin", bin_count, "of", len(bins)) + print("Fetching cases", b[0], "to", b[1], "(bin", bin_count, "of", str(len(bins)) + ")") self.cases_to_poll = self.total_cases_to_poll[b[0]: b[1]] print("Fetching API JSON data for cases to poll...") @@ -148,6 +147,8 @@ def __init__(self, sample_type, head=None, test_data=False, skip_demographics=Fa self.cases_to_skip = set(self.list_of_cases) - \ set(self.cases_to_add) - \ set(self.cases_to_update) + self.update_database() + print("Finished processing bin", bin_count, "of", len(bins)) for case in self.cases_to_add: diff --git a/gelweb/gel2mdt/management/commands/run_batch_update.py b/gelweb/gel2mdt/management/commands/run_batch_update.py index 3ec4ce12..fe39d846 100644 --- a/gelweb/gel2mdt/management/commands/run_batch_update.py +++ b/gelweb/gel2mdt/management/commands/run_batch_update.py @@ -54,4 +54,3 @@ def handle(self, *args, **options): test_data=options['test_data'], skip_demographics=options['skip_demographics'], pullt3=options['pullt3']) - mca.update_database() From 4f569783a289af2c0754a6412860c0e816a258e1 Mon Sep 17 00:00:00 2001 From: Theo Cole Date: Thu, 13 Sep 2018 11:47:13 +0100 Subject: [PATCH 03/10] nicer output from gel2mdt --- gelweb/gel2mdt/database_utils/case_handler.py | 1 - .../database_utils/multiple_case_adder.py | 29 +++++++++++-------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/gelweb/gel2mdt/database_utils/case_handler.py b/gelweb/gel2mdt/database_utils/case_handler.py index e0ecbb50..b48860e0 100755 --- a/gelweb/gel2mdt/database_utils/case_handler.py +++ b/gelweb/gel2mdt/database_utils/case_handler.py @@ -736,7 +736,6 @@ def get_panels(self): if not polled: panel_file = os.path.join(panelapp_storage, '{}_{}.json'.format(panel['panelName'], panel['panelVersion'])) - print(panel["panelName"], panel["panelVersion"]) if os.path.isfile(panel_file): try: diff --git a/gelweb/gel2mdt/database_utils/multiple_case_adder.py b/gelweb/gel2mdt/database_utils/multiple_case_adder.py index ae2b64fe..12304a0e 100755 --- a/gelweb/gel2mdt/database_utils/multiple_case_adder.py +++ b/gelweb/gel2mdt/database_utils/multiple_case_adder.py @@ -33,6 +33,7 @@ import logging import time from .demographics_handler import DemographicsHandler +from tqdm import tqdm # set up logging logger = logging.getLogger(__name__) @@ -164,9 +165,9 @@ def update_database(self): error = None try: logger.info("Adding cases from cases_to_add.") - print("Adding cases") + print("Adding", len(self.cases_to_add), "cases") self.add_cases() - print("Updating cases") + print("Updating", len(self.cases_to_update), "cases") self.add_cases(update=True) success = True except Exception as e: @@ -213,9 +214,12 @@ def fetch_test_data(self): return list_of_cases def fetch_api_data(self): - list_of_cases = [ - # list comprehension, calling self.get_case_json each time for poll - Case( + list_of_cases = [] + # list comprehension, calling self.get_case_json each time for poll + for case in tqdm(self.cases_to_poll): + tqdm.write("Polling for: {case}".format(case=case["interpretation_request_id"])) + + c = Case( # instatiate a new case with the polled json case_json=self.get_case_json(case["interpretation_request_id"]), panel_manager=self.panel_manager, @@ -223,8 +227,9 @@ def fetch_api_data(self): gene_manager=self.gene_manager, skip_demographics=self.skip_demographics, pullt3=self.pullt3 - ) for case in self.cases_to_poll - ] + ) + list_of_cases.append(c) + print("Successfully fetched", len(list_of_cases), "cases from CIP API.") return list_of_cases @@ -235,8 +240,6 @@ def get_case_json(self, interpretation_request_id): :param interpretation_request_id: an IR ID of the format XXXX-X :returns: A case json associated with the given IR ID from CIP-API """ - logger.info("Polling API for case", interpretation_request_id) - print("Polling API for case", interpretation_request_id) request_poll = PollAPI( # instantiate a poll of CIP API for a given case json "cip_api", "interpretation-request/{id}/{version}".format( @@ -392,8 +395,9 @@ def add_cases(self, update=False): model_objects = model_type.objects.all().values(*lookups) elif not lookups: model_objects = model_type.objects.all() - for case in cases: + for case in tqdm(cases, desc="Parsing {model_type} into DB".format(model_type=model_type.__name__)): # create a CaseAttributeManager for the case + tqdm.write(case.request_id) case.attribute_managers[model_type] = CaseAttributeManager( case, model_type, model_objects) # use thea attribute manager to set the case models @@ -408,11 +412,12 @@ def add_cases(self, update=False): ] elif many: model_list = [] - for case in cases: + for case in tqdm(cases, desc="Parsing {model_type} into DB".format(model_type=model_type.__name__)): attribute_manager = case.attribute_managers[model_type] many_case_model = attribute_manager.case_model - for case_model in many_case_model.case_models: + for case_model in tqdm(many_case_model.case_models, desc=case.request_id): model_list.append(case_model) + tqdm.write(str(case_model.entry)) # now create the required new Model instances from CaseModel lists if model_type == GELInterpretationReport: From b9f7ad021c634343399780029a4d2b86248d7ce3 Mon Sep 17 00:00:00 2001 From: Theo Cole Date: Thu, 13 Sep 2018 12:53:24 +0100 Subject: [PATCH 04/10] bugfix for loading bar for genes --- gelweb/gel2mdt/database_utils/case_handler.py | 4 +++- gelweb/gel2mdt/templates/gel2mdt/cancer_main.html | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/gelweb/gel2mdt/database_utils/case_handler.py b/gelweb/gel2mdt/database_utils/case_handler.py index b48860e0..81ee4c30 100755 --- a/gelweb/gel2mdt/database_utils/case_handler.py +++ b/gelweb/gel2mdt/database_utils/case_handler.py @@ -33,6 +33,7 @@ import re import copy import pprint +from tqdm import tqdm class Case(object): @@ -829,9 +830,10 @@ def get_genes(self): }) self.case.gene_manager.add_searched(transcript.gene_ensembl_id, str(transcript.gene_hgnc_id)) - for gene in gene_list: + for gene in tqdm(gene_list, desc=self.case.request_id): gene['HGNC_ID'] = None if gene['EnsembleGeneIds']: + tqdm.write(gene["EnsembleGeneIds"]) polled = self.case.gene_manager.fetch_searched(gene['EnsembleGeneIds']) if polled == 'Not_found': gene['HGNC_ID'] = None diff --git a/gelweb/gel2mdt/templates/gel2mdt/cancer_main.html b/gelweb/gel2mdt/templates/gel2mdt/cancer_main.html index cd31872a..26bb33e2 100755 --- a/gelweb/gel2mdt/templates/gel2mdt/cancer_main.html +++ b/gelweb/gel2mdt/templates/gel2mdt/cancer_main.html @@ -181,7 +181,7 @@

- + Trio status:
@@ -201,7 +201,7 @@

- + De novo status:
From b0446331f114e8a9e06885addef2e6e09c4fced1 Mon Sep 17 00:00:00 2001 From: Theo Cole Date: Thu, 13 Sep 2018 12:53:50 +0100 Subject: [PATCH 05/10] fixed security flaw in allowing MDT access to clin --- gelweb/gel2clin/templates/gel2clin/cancer_proband.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gelweb/gel2clin/templates/gel2clin/cancer_proband.html b/gelweb/gel2clin/templates/gel2clin/cancer_proband.html index a296777a..29e3fa8e 100755 --- a/gelweb/gel2clin/templates/gel2clin/cancer_proband.html +++ b/gelweb/gel2clin/templates/gel2clin/cancer_proband.html @@ -1,4 +1,4 @@ -{% extends 'gel2mdt/base.html' %} +{% extends 'gel2clin/base.html' %} {% load bootstrap3 %} {% load static %} {% block content %} From 5ae000405c8a020f8da73e1aa51a2f3500a98291 Mon Sep 17 00:00:00 2001 From: Patrick Lombard Date: Thu, 13 Sep 2018 13:59:00 +0100 Subject: [PATCH 06/10] added in gene search --- gelweb/gel2mdt/forms.py | 4 +++ .../templates/gel2mdt/cancer_main.html | 13 ++++++++ .../templates/gel2mdt/rare_disease_main.html | 13 ++++++++ gelweb/gel2mdt/urls.py | 1 + gelweb/gel2mdt/views.py | 30 +++++++++++++++++-- 5 files changed, 59 insertions(+), 2 deletions(-) diff --git a/gelweb/gel2mdt/forms.py b/gelweb/gel2mdt/forms.py index c719d43c..bf43c67f 100755 --- a/gelweb/gel2mdt/forms.py +++ b/gelweb/gel2mdt/forms.py @@ -376,3 +376,7 @@ class GenomicsEnglandform(forms.Form): # Version number of the interpretation ir_version = forms.IntegerField(label='Version') report_version = forms.IntegerField(label='Clinical Report Version') + + +class GeneSearchForm(forms.Form): + gene = forms.CharField(max_length=25, widget = forms.TextInput(attrs={'style': 'width:200px'})) diff --git a/gelweb/gel2mdt/templates/gel2mdt/cancer_main.html b/gelweb/gel2mdt/templates/gel2mdt/cancer_main.html index cd31872a..661cd52d 100755 --- a/gelweb/gel2mdt/templates/gel2mdt/cancer_main.html +++ b/gelweb/gel2mdt/templates/gel2mdt/cancer_main.html @@ -220,6 +220,19 @@

+
+ {% csrf_token %} + + + + + + + +
Gene Search:{{ gene_search_form.gene }} + +
+

diff --git a/gelweb/gel2mdt/templates/gel2mdt/rare_disease_main.html b/gelweb/gel2mdt/templates/gel2mdt/rare_disease_main.html index 8f3e72c3..85dab11b 100755 --- a/gelweb/gel2mdt/templates/gel2mdt/rare_disease_main.html +++ b/gelweb/gel2mdt/templates/gel2mdt/rare_disease_main.html @@ -220,6 +220,19 @@

+
+ {% csrf_token %} + + + + + + + +
Gene Search:{{ gene_search_form.gene }} + +
+
diff --git a/gelweb/gel2mdt/urls.py b/gelweb/gel2mdt/urls.py index d56eb10e..5bdefbd4 100755 --- a/gelweb/gel2mdt/urls.py +++ b/gelweb/gel2mdt/urls.py @@ -78,6 +78,7 @@ path(r'genomics_england_report/', views.genomics_england_report, name='genomics-england-report'), path('/audit/', views.audit, name='audit'), + path('/gene_search/', views.search_by_gene, name='gene_search'), ] + static(settings.STATIC_URL, document_root=settings.STATIC_DIR) urlpatterns += api_urlpatterns diff --git a/gelweb/gel2mdt/views.py b/gelweb/gel2mdt/views.py index a2e3cfab..7af7e1ad 100755 --- a/gelweb/gel2mdt/views.py +++ b/gelweb/gel2mdt/views.py @@ -226,7 +226,9 @@ def cancer_main(request): :param request: :return: ''' - return render(request, 'gel2mdt/cancer_main.html', {'sample_type': 'cancer'}) + gene_search_form = GeneSearchForm() + return render(request, 'gel2mdt/cancer_main.html', {'sample_type': 'cancer', + 'gene_search_form': gene_search_form}) @login_required @@ -238,7 +240,31 @@ def rare_disease_main(request): :param request: :return: ''' - return render(request, 'gel2mdt/rare_disease_main.html', {'sample_type': 'raredisease'}) + gene_search_form = GeneSearchForm() + return render(request, 'gel2mdt/rare_disease_main.html', {'sample_type': 'raredisease', + 'gene_search_form': gene_search_form}) + + +@login_required +def search_by_gene(request, sample_type): + latest_reports = GELInterpretationReport.objects.latest_cases_by_sample_type( + sample_type=sample_type + ) + gene_search_form = GeneSearchForm() + proband_variants = [] + gene = None + if request.method == 'POST': + gene_search_form = GeneSearchForm(request.POST) + if gene_search_form.is_valid(): + gene = gene_search_form.cleaned_data['gene'] + genes = Gene.objects.filter(hgnc_name__icontains=gene_search_form.cleaned_data['gene']) + proband_variants = ProbandVariant.objects.filter(probandtranscriptvariant__transcript__gene__in=genes, + interpretation_report__in=latest_reports).distinct() + return render(request, 'gel2mdt/gene_search.html', {'gene_search_form': gene_search_form, + 'proband_variants': proband_variants, + 'gene': gene, + 'sample_type': sample_type}) + @login_required From 71e3847cf85e1916da98527eb89e667d4933106a Mon Sep 17 00:00:00 2001 From: Patrick Lombard Date: Thu, 13 Sep 2018 14:23:27 +0100 Subject: [PATCH 07/10] missing html! --- .../templates/gel2mdt/gene_search.html | 138 ++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100755 gelweb/gel2mdt/templates/gel2mdt/gene_search.html diff --git a/gelweb/gel2mdt/templates/gel2mdt/gene_search.html b/gelweb/gel2mdt/templates/gel2mdt/gene_search.html new file mode 100755 index 00000000..be12391c --- /dev/null +++ b/gelweb/gel2mdt/templates/gel2mdt/gene_search.html @@ -0,0 +1,138 @@ + +{% extends 'gel2mdt/base.html' %} +{% load bootstrap3 %} +{% load static %} + + +{% block tabs %} + + + {% elif sample_type == 'raredisease' %} +
  • Cases
  • + + {% endif %} + + + + + +{% endblock %} + + + +{% block content %} + {% load gel2mdt_extras %} +
    +
    + {% csrf_token %} + + + + + + +
    {% bootstrap_form gene_search_form %}
    + + + +
    +
    +
    +
    +
    + {% if gene %} + Variants in {{ gene }} + {% endif %} +
    + +
    + + + + + + + + + + + + + + + + + + + + + {% for pv in proband_variants %} + + + + + + + + + + + + + + + + + {% endfor %} + +
    Variant LinkGeneCIP LinkGeL IDForenameSurnameGMCClinicianZygosityRecruiting DiseaseHGVScHGVSpHGVSg
    + + + + {{pv.get_transcript_variant.transcript.gene}} + + {{pv.interpretation_report.ir_family.ir_family_id}} + + {{pv.interpretation_report.ir_family.participant_family.proband.gel_id}}{{pv.interpretation_report.ir_family.participant_family.proband.forename}}{{pv.interpretation_report.ir_family.participant_family.proband.surname}}{{pv.interpretation_report.ir_family.participant_family.proband.gmc}}{{pv.interpretation_report.ir_family.participant_family.clinician.name}}{{pv.zygosity}}{{pv.interpretation_report.ir_family.participant_family.proband.recruiting_disease}}{{pv.get_transcript_variant.hgvs_c}}{{pv.get_transcript_variant.hgvs_p}}{{pv.get_transcript_variant.hgvs_g}}
    +
    + +
    + +
    + +
    +
    +{% endblock %} From ffce95f1ca7d4a2210fdec5e5b4771d813fb715c Mon Sep 17 00:00:00 2001 From: Patrick Lombard Date: Thu, 13 Sep 2018 14:42:32 +0100 Subject: [PATCH 08/10] formatting template fixed --- .../gel2mdt/templates/gel2mdt/gene_search.html | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/gelweb/gel2mdt/templates/gel2mdt/gene_search.html b/gelweb/gel2mdt/templates/gel2mdt/gene_search.html index be12391c..9287dea6 100755 --- a/gelweb/gel2mdt/templates/gel2mdt/gene_search.html +++ b/gelweb/gel2mdt/templates/gel2mdt/gene_search.html @@ -54,21 +54,13 @@ {% block content %} {% load gel2mdt_extras %}
    +
    - {% csrf_token %} - - - - - - -
    {% bootstrap_form gene_search_form %}
    - - - + {% csrf_token %} +{% bootstrap_form gene_search_form %} +
    +
    From 51e2ab78d1e226753554b16f775ce629c424d233 Mon Sep 17 00:00:00 2001 From: Patrick Lombard Date: Thu, 13 Sep 2018 14:51:42 +0100 Subject: [PATCH 09/10] minor mods to static --- .../gel2clin/raredisease_proband.html | 2 +- .../gel2mdt/static/css/bokeh-0.12.15.min.css | 1 + gelweb/gel2mdt/static/js/bokeh-0.12.15.min.js | 91 +++++++++++++++++++ gelweb/gel2mdt/templates/gel2mdt/audit.html | 5 +- 4 files changed, 96 insertions(+), 3 deletions(-) create mode 100644 gelweb/gel2mdt/static/css/bokeh-0.12.15.min.css create mode 100644 gelweb/gel2mdt/static/js/bokeh-0.12.15.min.js diff --git a/gelweb/gel2clin/templates/gel2clin/raredisease_proband.html b/gelweb/gel2clin/templates/gel2clin/raredisease_proband.html index b3cb455d..d20c89ba 100755 --- a/gelweb/gel2clin/templates/gel2clin/raredisease_proband.html +++ b/gelweb/gel2clin/templates/gel2clin/raredisease_proband.html @@ -19,7 +19,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --> -{% extends 'gel2mdt/base.html' %} +{% extends 'gel2clin/base.html' %} {% load bootstrap3 %} {% load static %} {% block content %} diff --git a/gelweb/gel2mdt/static/css/bokeh-0.12.15.min.css b/gelweb/gel2mdt/static/css/bokeh-0.12.15.min.css new file mode 100644 index 00000000..ba510c46 --- /dev/null +++ b/gelweb/gel2mdt/static/css/bokeh-0.12.15.min.css @@ -0,0 +1 @@ +.bk-root{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:10pt;position:relative;width:auto;height:auto}.bk-root .bk-shading{position:absolute;display:block;border:1px dashed green;z-index:100}.bk-root .bk-tool-icon-box-select{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEg0kduFrowAAAIdJREFUWMPtVtEKwCAI9KL//4e9DPZ3+wP3KgOjNZouFYI4C8q7s7DtB1lGIeMoRMRinCLXg/ML3EcFqpjjloOyZxRntxpwQ8HsgHYARKFAtSFrCg3TCdMFCE1BuuALEXJLjC4qENsFVXCESZw38/kWLOkC/K4PcOc/Hj03WkoDT3EaWW9egQul6CUbq90JTwAAAABJRU5ErkJggg==")}.bk-root .bk-tool-icon-box-zoom{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEg82t254aQAAAkBJREFUWMPN11+E1FEUB/DPTFn2qaeIpcSwr5NlUyJiKWVXWUqvlUh/iE3RY9mUekkPPURtLKNRrFJEeuphGfUUaVliiX1aVjGs6aG7+XX9ZnZ+d2fTl2vmnHvPPfeee/79Sk+may2/UQq/q7Qu+bAJoxjHIKqB/wlfUMcMVqI9bLZ+DGIKwzlzQ2GcxCx2xwvKOUKlaHTiX8bHNspjDONHkOmJBW5jIof/FvPh/06MZOb6cRc7cGn1AKUE5cdzlM/gAr5F/O24H3xkFRfxAbVygvK+cIsspjGWo1zgjeFpxL+BvnLw7laBA4xjIFJwrgu52DoVjKdY4HBEX8dSF3JLYe1fe6UcYCii3xWQjdfuSTnAtoheKCC7GNED5Zx4L4qt61jbTLHA94geKSC7P7ZeShQ0Inoi1IJuEOeORooFXkV0FZNdZs5qvFfKAeqYy7nZ6yg//HG0MBfffh71lFrQDCW2EvEP4mt4okZUDftz9rmGZkotmMxJRtlisy+MTniAWrty3AlXw0hFM2TD89l+oNsoOJXjbIs4EpqNtTCLXbiZ0g+M4mFObj8U3vsNjoZCVcmk60ZwthpepLZkB/AsivWfOJZxtpUQHfWib7KWDwzjeegBZJSdKFiE2qJTFFTwEls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ujRSUCrm2d4L3/kvn3JPe+8+BDW2i9o+kT7z3kxP5sYsA6W47oE64TsR7P9tQL4vA2mh9WdIscKxUyJ0M7aR7acOGzikD65EQLEjaa2ZXzMwDFeB6qZBbbLTRE4EGeSaozNOZgYFf8qP7lmIvs354n0qlHpB0T7B9Ogl4IgJJrmjv/SiQjbrkD+BMUkfSbYATPdckrTOzkciWAXOlQu5cYgLdPEIapud9wMOR9zVJH3ViKx333mtHMJvNuoWFhZ3A+ojMcja77njXBEKwJJfTcqUyCIQ34Mf7nnh0paMnXacFuGoC1mr3AtuDfLzd8Zuyl+rfuGn4HLAD+Az4qZQf+61TAj0Noj8vX6oC35SL43u7teG6rf5+iXppwW7/JUL5D03qaFRvvUe+AAAAAElFTkSuQmCC")}.bk-root .bk-tool-icon-zoom-out{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEgsHgty9VwAAA0FJREFUWMO9l09oXFUUxn/fmXlpItppi22k7UJBRSlVkCytSAuKUloIdjKT0El3FXVXdVFKRVAQV7qQohsNwdA0UFvBhYtqUVyIVlRaogtFQVq7qSTVjA3z3nHzBq/jvPmTN/Ss7rv3nvN99/y794kByMzcfE/7picn/jenmwWeRUI3E7wdCRskuCSTdDfwBvCtJEdySV9KOhpF0e0/LF5SqKtBgbv7ZjObcvfXgShD9Zqk5+orKx8Oj4z8NT05kU1gZm6+bdK0Azezu9z9hLs/HoIBvwAF4H5gKFh7B3gBWFY3460kWve4+3oze9fdx9OpVUmvmNlMHMf1RqNBFEUldz8OHAxUX9q6bduryut+Sfvc/Wz62ZD0fK1afjND9y3gGSRwv1GMojstTxUUCoVhdyopEYDzKXjWwZ4FFnEHWBc3Goet00m7lZlZYQixKw0FZnakGZksHUnHgvCN5/KARBH37enpOVg58H13HV0Kxg/kIuD/ngSA2ZMLt3bTSZJkUzN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drhC28n06SCeSzNZxlvBINGRXCtKS7EY1uV6V7HWAm38y1cXaXsMcOCvr9ySPj+af7A1U2HJXHzVNvUXVLIGyPf+jV0pf8GHoN+TLAyPkidTCi2RpPApmnR0Bd1zGRaB/B8Oj2HSw7LLbVR1MmskW8RdEWVXSJf3JbpAMgRtc4IZoxTh9qotQjCasm46M0YX9pV1VmbpvRH5OwwgdRtSg2vKaAz/1dNKVtb17Y8DCL4HVufHxMOYl1/zTgIgiYvBnFKfaNp3YjTdPz3n9Na8//X7/k/O1tdwopcZlcAAAAASUVORK5CYII=")}.bk-root .bk-tool-icon-hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEg4oVHp0SwAAAQJJREFUWMPtlsENgzAMRb8RQ5VJItFDOgaZAMaAA0iZpN3KPZSoEEHSQBCViI/G8pfNt/KAFFcPshPdoAGgZkYVVYjQAFCyFLN8tlAbXRwAxp61nc9XCkGERpZCxRDvBl0zoxp7K98GAACxxH29srNNmPsK2l7zHoHHXZDr+/9vwDfB3kgeSB5IHkgeOH0DmesJjSXi6pUvkYt5u9teVy6aWREDM0D0BRvmGRV5N6DsQkMzI64FidtI5t3AOKWaFhuioY8dlYf9TO1PREUh/9HVeAqzIThHgWZ6MuNmC1jiL1mK4pAzlKUojEmNsxcmL0J60tazWjLZFpClPbd9BMJfL95145YajN5RHQAAAABJRU5ErkJggg==")}.bk-root .bk-tool-icon-crosshair{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAADEUlEQVRYR81XXVIaQRCeHqug8CXmBNETaE4gniDwIgpVspxAbxC9ATkBkCpQ8gKeQDiB5AQxNyAvUlrldr7eHxyGXZi1rMJ5opbp7m++7un+htSGF204vsoMoNXrlzSpfWa1oxQfhAegCZGaEtPorHo8znIoJwCt6+td8uk7ApUQCIHTF4BNAWzImq8ap6cP68CsBdDp9i9ZqXM7ML79g/EnCWD+jgMKENKqWT+tXK0CkQqgNRjs0OxpQIqKhoMxaG6/6JeRnK7T6yO2UvVqhYSlLX+ryORfgKn9ORDFIy7ky41yGcwsr0QAQfDH5zucOswx819fs4egI9OFCcD8DjBF7VNbEX0JzdWEt3NHSSASAcCxBDqMgt/623kvyTgNgNjJIfTjk4D4FqaJR1715MjmYAmA5Bx3AwUXQL+t105KaTlcBSC26XRvhjEIoLiq1yqXpr8FAGG16/ug4IT27fxBWu7EiQuAiImJpEMKE6nYM30uAIDDttSUOPfJP7JzbjPhAiBIh9QE67vIvoOi9WJfCwDavf40ulpjbCqmUf+W753ezURuh7Dg1SqflwAEHU6pgfyBq9Y4qx0LG++2fnZ/eUzcstmdM2AWH+jfc+liWdBJfSENf8Lifi3GVwC9mybOfi5dzatWVrbbLIHNva8p5h/16gkaFiLGGxbufkoE6XguwePiXLF3XmMfCUCUAqtKXU7sumd1CowOuJEi3Pg1FBpjitIGhyvVSfvmjci6ZR+rFQfDiPVE2jFYeICQ+PoewwjC5h7CZld6DBdyu6nDSKgzOyIMhmhK5TTqXYbRorZYM46TmpKAAOrGWwSJJekSB1yqJNOzp1Gs7YJ0EDeySDIMtJbQHh6Kf/uFfNFZkolJICRmz0P8DKWZuIG2g1hpok+Mk0Qphs0h9lzMtWRoNvYLuVImUWrmPJDlBKeRBDfATGOpHkhw670QSHWGLLckmF1PTsMlYqMJpyUbiO0weiMMceqLVTcotnMCYAYJJbcuQrVgZFP0NOOJYpr62pf3AmrHfWUG4O7abefGAfwH7EXSMJafOlYAAAAASUVORK5CYII=")}.bk-root .bk-tool-icon-lasso-select{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEgwlGP1qdAAABMBJREFUWMO9V1uIVVU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YA9gShuEDkgzJHyWtB/B1irQ2juP7ADxkrX0wOUOpzmdpzEY590HJ7Ni1r2kSyZOSiv2+hSRjSTXp/QAukzySNJOJkmalyNIl10hqMcasdc61XDNcQRD8BnITgNp+36r6kfcNFMMlLQGwTNLMEuQGQBfJl2bdPru+HDkAZAqFQux53jZHEsC6aw0eg2gylNRBcqcx5v04ji999+03AwsWAOI4Lsy9a94WkisAnE5a5WCJYwCfA1g7LJudI2lTHMeXBm1faiQzxkyRtF3S5CTupeAB+KG2tnZFT0/P30NO2VKLzrmfAbwGMipjG5Oc0dPTc0Md05SZ5U4Q2FxChErtEYD7jTGNQ3UgM8Asv90Yc9I5LSKRlXSI5CxJa0jWSALJjKRnAewfkniT+vwf7N7fXHK9rq7O7+jo+BTA/NRrdBpjnnLOnUrvXd7YMPQXSBunneno6IhIHgYwW1JtkgmBpBkATlVMAwOk3nFJ+VSoqgCMr6gIy2FcLtdKspAedyQN/98caDt/3kpyabUmf8WvG/8A1vODTBVE/0MAAAAASUVORK5CYII=")}.bk-root .bk-tool-icon-pan{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEg4lKssI9gAAAOtJREFUWMPVll0KwyAMgNPgoc0JzDX2Mtgp3csKErSamGabIEUo/T6bHz0ezxdsjPJ5kvUDaROem7VJAp3gufkbtwtI+JYEOsHNEugIN0mgM1wtsVoF1MnyKtZHZBW4DVxoMh6jaAW0MTfnBAbALyUwCD6UwEB4VyJN4FXx4aqUAACgFLjzrsRP9AECAP4Cm88QtJeJrGivdeNdPpko+j1H7XzUB+6WYHmo4eDk4wj41XFMEfBZGXpK0F/eB+QhVcXslVo7i6eANjF5NYSojCN7wi05MJNgbfKiMaPZA75TBVKCrWWbnGrb3DPePZ9Bcbe/QecAAAAASUVORK5CYII=")}.bk-root .bk-tool-icon-xpan{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEg4X4hxZdgAAAMpJREFUWMPtlsEKwjAMhr/pwOOedINJe/PobWXCfAIvgo/nA4heOiilZQqN2yE5lpD/I38SWt3uD9aMHSuHAiiAAmwaYCqoM/0KMABtQYDW11wEaHyiEei28bWb8LGOkk5C4iEEgE11YBQWDyHGuAMD0CeS30IQPfACbC3o+Vd2bOIOWMCtoO1mC+ap3CfmoCokFs/SZd6E0ILjnzrhvFbyEJ2FIZzXyB6iZ3AkjITn8WOdSbbAoaD4NSW+tIZdQYBOPyQKoAAKkIsPv0se4A/1UC0AAAAASUVORK5CYII=")}.bk-root .bk-tool-icon-ypan{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEg4anK0lywAAAMVJREFUWMPtlzEKwzAMRX/S7rlpIMXeOnaLaME36FLo8XqCdNFghGljyc4kgQi2Q/SUj0F/eL7eMMTKz6j9wNlYPGRrFcSoLH4XxQPvdQeYuPOlcLbw2dRTgqvoXEaolWM0aP4LYm0NkHYWzyFSSwlmzjw2sR6OvAXNwgEcwAEcwAEcwAEcoGYk20SiMCHlmVoCzACoojEqjHBmCeJOCOo1lgPA7Q8E8TvdjMmHuzsV3NFD4w+1t+Ai/gTx3qHuOFqdMQB8ASMwJX0IEHOeAAAAAElFTkSuQmCC")}.bk-root .bk-tool-icon-polygon-select{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEjc1OfiVKAAAAe1JREFUWMPt1r9rU1EUB/DPK0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data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEg4UexUIzAAAAIRJREFUWMNjXLhs5X+GAQRMDAMMWJDYjGhyf7CoIQf8x2H+f0KGM9M7BBio5FNcITo408CoA0YdQM1cwEhtB/ylgqMkCJmFLwrOQguj/xTg50hmkeyARAYGhlNUCIXjDAwM0eREwTUGBgbz0Ww46oBRB4w6YNQBow4YdcCIahP+H5EhAAAH2R8hH3Rg0QAAAABJRU5ErkJggg==")}.bk-root .bk-tool-icon-tap-select{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdp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mAaddpscYFFXwR7vnXBRGlnUN/L6kqKJlxnRUuDbaDBiL+vst5d4gpcpBrqk/2jIgCKVUolhntplzivHmwh4stGOPfwBWwl/2dpp8p7xjQZqFLiQJtauKkivYm+kzccpK57yXfOUe+P23JqAnVbhMFmlXntCWnxbT31am9ZJ4BJifsUmNTqt0cYhA5ypympPg7VkEKunPbVb8cIG+0kyHLJZNR7fUMooUKFHAPkfQo58VLK+RzwRDd4FdWG9mjpaAXzqkJa1R7kQttqEABWXMjOOxxVRfnhRm5URX1prk/0pQHwNcKlchZ+jdpC+hFdVqO0my9Hj5dkYgCn1Rfh/KdlNDHrJhPqlDih+IfBd6qwpOgEqYMsorJ2HtWxtagLJDn/W3KRfPOZhoeBJfZPgVeGKeKrkQBh5dLXl25Ny3pc4/1fkTdbvFqFQgbxWeYD0hXulhQ0pYiM1jG547fcbMQpVnHTZEn9W3ljsCzwHxCdVteNHIZvQa7/7cC7nV6zHIfyFP9EXjFa7YxKAVqPP4bxhhoLWW+z9JyCb6M/MREg59/RlmmXbmneIybB+YC/ay+yrffqEddDzwGvKxxDmzhc0tc80XVgblqFfgjwAAPubcGjAOl1wAAAABJRU5ErkJggg==")}.bk-root .bk-tool-icon-undo{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEg4em8Dh0gAAAatJREFUWMPt1rFrFFEQBvDfGhACASshkL/ALpWVrSAKEQV5sIULWlgZNSgIFkGIVQ412gkBt1lYLERREFJqJRaW1oHAoZUQsDqwecWy7N3tbe6C4H2wxc682Zn3zTfvLXPM8b8j6RqYF+UCzsfnHBawGt3fMcAX7GEvS8NgKgXkRbmMxwg41TLsN0psZmnodyogL8pFPMIdLHUk7hA7eJKl4U/rAuKu3+HslFr/FZezNPSTFslX8QErDe4DvMVH/Iq9F7VwGpdwZUjsPtaSFjv/1vCBPj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0h7bX5R0WzI9HUL4qe2XbI+dk3xl+V7gxoztD5jRI+YK/zkEEokx2/uB/RdzIfUtueqVN04cXwF8G3iHY3z9Urw/j8ClyhsnjrcS2Vv/J/8NLxT+/zqBTkcxU/cfEkyEAu3kmjAAAAAASUVORK5CYII=")}.bk-root .bk-tool-icon-box-edit{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEg4QfHjM1QAAAGRJREFUWMNjXLhsJcNAAiaGAQYsDAwM/+lsJ+OgCwGsLqMB+D8o08CoA0YdMOqAUQewDFQdMBoFIyoN/B/U7YFRB7DQIc7xyo9GwbBMA4xDqhxgISH1klXbDYk0QOseEeOgDgEAIS0JQleje6IAAAAASUVORK5CYII=")}.bk-root .bk-tool-icon-poly-draw{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEjglo9eZgwAAAc5JREFUWMPt1zFrU1EUB/DfS4OmVTGDIChCP4BgnQXRxVHqIJUupp9AB8VBQcRBQUXIB9DWQoMRiXZzcnQSA34A7aAuHSJKkgo2LvfBrU3aJnlYkBy4vHcP557zP/9z3r33JdXa647N0kHSZd5Nn0rSxc8G3cXp85sMcnZZ8vge3osZ+l3vB8CWFA0iL14t79h210swAjACMAIwAjACkB90D/8/GchI9ve4nPwTBh5E9ws7OepzGWb9EddSn51Op9ZstadSg4VK1UKlKkmSDSMLALewiuNh/hVJq71Wxttmqz0dG88vPc+MgWP4grvYG3SLOBrZFFFrttqPe4HIDxh4GSei+98iSlusuYopXEAjBtEPA3tQwUpwluAbDm4TPJUz+BTW9l2Ce6G7L0X/Bw8D3T/7SKKIDzHg7QCcxjvcQAEtXAnrrg/RP0/DKPbqgcN4iVOR7gcO4dcQgRuoh7HSqwlP4n20m63jJu5n8MkWMYfP3UowhzdR8FU8w9iQwevBdyq3/27CMRzAE5yLuvsRLg+ZcR1nJ8YL81HWJUzGAPaFZwe/Q5MdyYDyNHgjzO90YyGHtVDncuiJchaHw8R4oREFV5qdiVmYLM3OgD9k5209/atmIAAAAABJRU5ErkJggg==")}.bk-root .bk-tool-icon-point-draw{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEiERGWPELgAAA4RJREFUWMO1lr1uG1cQhb9ztdRSP7AF1QxgwKlcuZSqRC9gWUUUINWqTh5AnaFOnVPEteQmRuhCURqWsSqqc9IolREXdEvQBElxtdw7KURSFEVKu4w8wAKLxdw9Z+bMnRmZGXfZ29//II8th4WwGVNyIoQLYB5vxA9Caq04iUd9A+7ZlsNC2I7TdSd2hZXMJKlnTqp9jtl/GBaqoyQ0noFKpUIzBicYYc+DEFpxkglc4oVJa5gvDn8v1xV2irG3FM4NSVwjUKlUaMcpJhCGmSEJQ6QGD8M5WnHCd8+f3QCXpPLx8WNwv0j6Bm9FMK7FJ3WBE+R/2t7c/GBmFvSBrzRTCsyTDjXrxUgEMtpxynJYmJoBJ4VAybwVARgvL7Oik0okCodnKpVKX7P0leiVMb0VvbJT+upznK4vh0GIeQwwQStJkHQD3MwsCALTJRG7Qrdrj5m/djgYaIa0hlkRdJk26XEgC9txurccBtVW3IudBImmZuACUP+ZlIDBt9FKcubYNTcAH/X0RYM1E7utJPlqe+uZzPxUcEkiSS4sTT95n15Mud0xWC0o2PAWOCdK3KYZlFxfM+tHOcnMzNr1es18ug+cgsVjP4yBU/Ppfrter1m/+l0+zYygML1xRVHU7TSb1cSzBzoBzszsH+AMdJJ49jrNZjWKou6wBnwOzcyndBpNbuueURR1Dw8Pq35p9cc5p/Dy9Dypt7jXrtdGwQECS9NPhr6Gq6txUzNigE6zydLK6lTw12/KT4FGFEUfJX2YJNONq5tVs4ODA7sD/DnwJ/BoADZuE3tHFs12dna6d4C/BI6AlbyzI8ii2TTw12/KK33gb2cdXsNZoAntbZC2SeO4c9592k/5eNQbiwvFd1kJuFGwLJr1wSPg/SwpvyFBHufOeXcFeAlE97U/uCxOY+P3b+Bn4B3Q+L8EdJfD4a+/AbC4UBzPxiPg3wlHZquB28Cn2IuR9x3gr3uV4DbwfvSDOvi4uFA8BDZmIRHkjHpS9Ht9iRqd8+5G3g05mAGcQbsdiX5QJ428G7Kygo8XYdb1/K4NWVmjzkNge2sz84bs+ELmpDDLtqWsNZBXgvmw8CTtpWVMT7x5YWBjLARnwZfKQNYN2U2LPvrh+5nBt7c2M2/It9bArCTKR8eZN+SJ13AScPnoODeRdqNenH+wul5w2gUr2WUjMFAt8bZ/0axX/wNnv4H8vTFb1QAAAABJRU5ErkJggg==")}.bk-root .bk-tool-icon-poly-edit{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gELFi46qJmxxAAABV9JREFUWMOdl19vFFUYxn9n9u9sCyylUIzWUoMQBAWCMdEEIt6xIRQSLIEKtvHe6AcA4yeQb7CAUNJy0daLeomJN8SEULAC2kBBapBKoLvbmdl/c14vdmY7u91tF95kknPOnHmf95znPc97Ro2OTeBbdjFDT3c32ZxVHUOE9kSMB0/m6ExuoJn1H+ur6Y+OTfD50SMN5168OgrAlyf7CfuD+z7+iDs3p8hkLUQ0iFQ/yFl5Nm/qonfHVva+s32Zw9GxCYILsZ08tpNfBhbs+1YN4OH9+7huGdECSBVfqUosbsllfmauBqiR+cCNwOr7AEo8pPHJnymXykhg5fUWjoQpl0vVvhZhbSzGoUOHqgBlt6B6uruj2Zy1E9jo0fhfeyL2x4Mnc8VErK0KUEOB64JSyptfG4R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PQfAut4oFV//IS7gkcB34VlVo8kGzphlfB+DU+TfNGBpZtRastvrvARJmfMF28ge9sc2B9/PNnCilMIDwK6y8/ow/Ai4kvILTljAXvDvEvrqKSUs60KolzPjBxspavQD2tKqCAGF/Ba+xE/Wbilu54wZV8NEKF5fXzQHl/bh4hUsE0WAXSlDMYcQSrQXgCmsTseXHsJkNnjqBFGwKJaHsKlxtUHYVhbLCzr1kaOA4bcn1y1Swmb+iLpJKpVrfgdpfsiVVCYcgluwgnU7jEgJ4s5UkLFtWYyHyEg0/N1q1tmQH+YXnAMFr97Nmv3p+0QsHQRsF8qpBOE5+rb9Nkaj50tVQKjqh4OU3GNL/1/So3vuUgbAAAAAASUVORK5CYII=")}.bk-root .bk-grid-row,.bk-root .bk-grid-column{display:flex;display:-webkit-flex;flex-wrap:nowrap;-webkit-flex-wrap:nowrap}.bk-root .bk-grid-row>*,.bk-root .bk-grid-column>*{flex-shrink:0;-webkit-flex-shrink:0}.bk-root .bk-grid-row{flex-direction:row;-webkit-flex-direction:row}.bk-root .bk-grid-column{flex-direction:column;-webkit-flex-direction:column}.bk-root .bk-canvas-wrapper{position:relative;font-size:12pt}.bk-root .bk-canvas,.bk-root .bk-canvas-overlays,.bk-root .bk-canvas-events{position:absolute;top:0;left:0;width:100%;height:100%}.bk-root .bk-canvas-map{position:absolute;border:0}.bk-root .bk-logo{margin:5px;position:relative;display:block;background-repeat:no-repeat}.bk-root .bk-logo.bk-grey{filter:url("data:image/svg+xml;utf8,#grayscale");filter:gray;-webkit-filter:grayscale(100%)}.bk-root .bk-logo-notebook{display:inline-block;vertical-align:middle;margin-right:5px}.bk-root .bk-logo-small{width:20px;height:20px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAOkSURBVDiNjZRt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9hxjkpWDaCg6Ckj5qebgBVbT3V3NNXMSiWSDdGV3hrtzla7J+duwPOToIg42ChPQOQjspnSlp1V+Gjdged7+8UN5CRAV7a5EdFNwCjEaBR27b3W890TE7g24NAP/mMDXRWrGoFPQI9ls/MWO2dWFAar/xcOIImbbpA3zgAAAABJRU5ErkJggg==)}.bk-root .bk-toolbar,.bk-root .bk-toolbar *{box-sizing:border-box;margin:0;padding:0}.bk-root .bk-toolbar,.bk-root .bk-button-bar{display:flex;display:-webkit-flex;flex-wrap:nowrap;-webkit-flex-wrap:nowrap;align-items:center;-webkit-align-items:center;user-select:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.bk-root .bk-toolbar .bk-logo{flex-shrink:0;-webkit-flex-shrink:0}.bk-root .bk-toolbar-above,.bk-root .bk-toolbar-below{flex-direction:row;-webkit-flex-direction:row;justify-content:flex-end;-webkit-justify-content:flex-end}.bk-root .bk-toolbar-above .bk-button-bar,.bk-root .bk-toolbar-below .bk-button-bar{display:flex;display:-webkit-flex;flex-direction:row;-webkit-flex-direction:row}.bk-root .bk-toolbar-above .bk-logo,.bk-root .bk-toolbar-below .bk-logo{order:1;-webkit-order:1;margin-left:5px}.bk-root .bk-toolbar-left,.bk-root .bk-toolbar-right{flex-direction:column;-webkit-flex-direction:column;justify-content:flex-start;-webkit-justify-content:flex-start}.bk-root .bk-toolbar-left .bk-button-bar,.bk-root .bk-toolbar-right .bk-button-bar{display:flex;display:-webkit-flex;flex-direction:column;-webkit-flex-direction:column}.bk-root .bk-toolbar-left .bk-logo,.bk-root .bk-toolbar-right .bk-logo{order:0;-webkit-order:0;margin-bottom:5px}.bk-root .bk-toolbar-button{width:30px;height:30px;background-size:60%;background-color:transparent;background-repeat:no-repeat;background-position:center center}.bk-root .bk-toolbar-button:hover{background-color:#f9f9f9}.bk-root .bk-toolbar-button:focus{outline:0}.bk-root .bk-toolbar-button::-moz-focus-inner{border:0}.bk-root .bk-toolbar-above .bk-toolbar-button{border-bottom:2px solid transparent}.bk-root .bk-toolbar-above .bk-toolbar-button.bk-active{border-bottom-color:#26aae1}.bk-root .bk-toolbar-below .bk-toolbar-button{border-top:2px solid transparent}.bk-root .bk-toolbar-below .bk-toolbar-button.bk-active{border-top-color:#26aae1}.bk-root .bk-toolbar-right .bk-toolbar-button{border-left:2px solid transparent}.bk-root .bk-toolbar-right .bk-toolbar-button.bk-active{border-left-color:#26aae1}.bk-root .bk-toolbar-left .bk-toolbar-button{border-right:2px solid transparent}.bk-root .bk-toolbar-left .bk-toolbar-button.bk-active{border-right-color:#26aae1}.bk-root .bk-button-bar+.bk-button-bar:before{content:" ";display:inline-block;background-color:lightgray}.bk-root .bk-toolbar-above .bk-button-bar+.bk-button-bar:before,.bk-root .bk-toolbar-below .bk-button-bar+.bk-button-bar:before{height:10px;width:1px}.bk-root .bk-toolbar-left .bk-button-bar+.bk-button-bar:before,.bk-root .bk-toolbar-right .bk-button-bar+.bk-button-bar:before{height:1px;width:10px}.bk-root .bk-tooltip{font-family:"HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;font-weight:300;font-size:12px;position:absolute;padding:5px;border:1px solid #e5e5e5;background-color:white;pointer-events:none;opacity:.95}.bk-root .bk-tooltip>div:not(:first-child){margin-top:5px;border-top:#e5e5e5 1px dashed}.bk-root .bk-tooltip.bk-left.bk-tooltip-arrow::before{position:absolute;margin:-7px 0 0 0;top:50%;width:0;height:0;border-style:solid;border-width:7px 0 7px 0;border-color:transparent;content:" ";display:block;left:-10px;border-right-width:10px;border-right-color:#909599}.bk-root .bk-tooltip.bk-left::before{left:-10px;border-right-width:10px;border-right-color:#909599}.bk-root .bk-tooltip.bk-right.bk-tooltip-arrow::after{position:absolute;margin:-7px 0 0 0;top:50%;width:0;height:0;border-style:solid;border-width:7px 0 7px 0;border-color:transparent;content:" ";display:block;right:-10px;border-left-width:10px;border-left-color:#909599}.bk-root .bk-tooltip.bk-right::after{right:-10px;border-left-width:10px;border-left-color:#909599}.bk-root .bk-tooltip.bk-above::before{position:absolute;margin:0 0 0 -7px;left:50%;width:0;height:0;border-style:solid;border-width:0 7px 0 7px;border-color:transparent;content:" ";display:block;top:-10px;border-bottom-width:10px;border-bottom-color:#909599}.bk-root .bk-tooltip.bk-below::after{position:absolute;margin:0 0 0 -7px;left:50%;width:0;height:0;border-style:solid;border-width:0 7px 0 7px;border-color:transparent;content:" ";display:block;bottom:-10px;border-top-width:10px;border-top-color:#909599}.bk-root .bk-tooltip-row-label{text-align:right;color:#26aae1}.bk-root .bk-tooltip-row-value{color:default}.bk-root .bk-tooltip-color-block{width:12px;height:12px;margin-left:5px;margin-right:5px;outline:#ddd solid 1px;display:inline-block}.bk-root .bk-plotdiv{position:relative;width:auto;height:auto}.rendered_html .bk-root .bk-tooltip table,.rendered_html .bk-root .bk-tooltip tr,.rendered_html .bk-root .bk-tooltip th,.rendered_html .bk-root .bk-tooltip td{border:0;padding:1px}//# sourceMappingURL=bokeh.min.css.map diff --git a/gelweb/gel2mdt/static/js/bokeh-0.12.15.min.js b/gelweb/gel2mdt/static/js/bokeh-0.12.15.min.js new file mode 100644 index 00000000..aaf08903 --- /dev/null +++ b/gelweb/gel2mdt/static/js/bokeh-0.12.15.min.js @@ -0,0 +1,91 @@ +!function(t,e){t.Bokeh=function(t,e,i){var n={},r=function(i){var o=null!=e[i]?e[i]:i;if(!n[o]){if(!t[o]){var s=new Error("Cannot find module '"+i+"'");throw s.code="MODULE_NOT_FOUND",s}var a=n[o]={exports:{}};t[o].call(a.exports,r,a,a.exports)}return n[o].exports},o=r(52);return o.require=r,o.register_plugin=function(i,n,s){for(var a in i)t[a]=i[a];for(var a in n)e[a]=n[a];var l=r(s);for(var a in l)o[a]=l[a];return l},o}([function(t,e,i){var n=t(142),r=t(32);i.overrides={};var o=r.clone(n);i.Models=function(t){var e=i.overrides[t]||o[t];if(null==e)throw new Error("Model '"+t+"' does not exist. This could be due to a widget\n or a custom model not being registered before first usage.");return e},i.Models.register=function(t,e){i.overrides[t]=e},i.Models.unregister=function(t){delete i.overrides[t]},i.Models.register_models=function(t,e,i){if(void 0===e&&(e=!1),null!=t)for(var n in t){var r=t[n];e||!o.hasOwnProperty(n)?o[n]=r:null!=i?i(n):console.warn("Model '"+n+"' was already registered")}},i.register_models=i.Models.register_models,i.Models.registered_names=function(){return Object.keys(o)},i.index={}},function(t,e,i){var n=t(317),r=t(14),o=t(50),s=t(260),a=t(261),l=t(2);i.DEFAULT_SERVER_WEBSOCKET_URL="ws://localhost:5006/ws",i.DEFAULT_SESSION_ID="default";var h=0,c=function(){function t(t,e,n,o,s){void 0===t&&(t=i.DEFAULT_SERVER_WEBSOCKET_URL),void 0===e&&(e=i.DEFAULT_SESSION_ID),void 0===n&&(n=null),void 0===o&&(o=null),void 0===s&&(s=null),this.url=t,this.id=e,this.args_string=n,this._on_have_session_hook=o,this._on_closed_permanently_hook=s,this._number=h++,this.socket=null,this.session=null,this.closed_permanently=!1,this._current_handler=null,this._pending_ack=null,this._pending_replies={},this._receiver=new a.Receiver,r.logger.debug("Creating websocket "+this._number+" to '"+this.url+"' session '"+this.id+"'")}return t.prototype.connect=function(){var t=this;if(this.closed_permanently)return n.Promise.reject(new Error("Cannot connect() a closed ClientConnection"));if(null!=this.socket)return n.Promise.reject(new Error("Already connected"));this._pending_replies={},this._current_handler=null;try{var e=this.url+"?bokeh-protocol-version=1.0&bokeh-session-id="+this.id;return null!=this.args_string&&this.args_string.length>0&&(e+="&"+this.args_string),this.socket=new WebSocket(e),new n.Promise(function(e,i){t.socket.binaryType="arraybuffer",t.socket.onopen=function(){return t._on_open(e,i)},t.socket.onmessage=function(e){return t._on_message(e)},t.socket.onclose=function(e){return t._on_close(e)},t.socket.onerror=function(){return t._on_error(i)}})}catch(t){return r.logger.error("websocket creation failed to url: "+this.url),r.logger.error(" - "+t),n.Promise.reject(t)}},t.prototype.close=function(){this.closed_permanently||(r.logger.debug("Permanently closing websocket connection "+this._number),this.closed_permanently=!0,null!=this.socket&&this.socket.close(1e3,"close method called on ClientConnection "+this._number),this.session._connection_closed(),null!=this._on_closed_permanently_hook&&(this._on_closed_permanently_hook(),this._on_closed_permanently_hook=null))},t.prototype._schedule_reconnect=function(t){var e=this;setTimeout(function(){e.closed_permanently||r.logger.info("Websocket connection "+e._number+" disconnected, will not attempt to reconnect");return},t)},t.prototype.send=function(t){if(null==this.socket)throw new Error("not connected so cannot send "+t);t.send(this.socket)},t.prototype.send_with_reply=function(t){var e=this,i=new n.Promise(function(i,n){e._pending_replies[t.msgid()]=[i,n],e.send(t)});return i.then(function(t){if("ERROR"===t.msgtype())throw new Error("Error reply "+t.content.text);return t},function(t){throw t})},t.prototype._pull_doc_json=function(){var t=s.Message.create("PULL-DOC-REQ",{}),e=this.send_with_reply(t);return e.then(function(t){if(!("doc"in t.content))throw new Error("No 'doc' field in PULL-DOC-REPLY");return t.content.doc},function(t){throw t})},t.prototype._repull_session_doc=function(){var t=this;null==this.session?r.logger.debug("Pulling session for first time"):r.logger.debug("Repulling session"),this._pull_doc_json().then(function(e){if(null==t.session)if(t.closed_permanently)r.logger.debug("Got new document after connection was already closed");else{var i=o.Document.from_json(e),n=o.Document._compute_patch_since_json(e,i);if(n.events.length>0){r.logger.debug("Sending "+n.events.length+" changes from model construction back to server");var a=s.Message.create("PATCH-DOC",{},n);t.send(a)}t.session=new l.ClientSession(t,i,t.id),r.logger.debug("Created a new session from new pulled doc"),null!=t._on_have_session_hook&&(t._on_have_session_hook(t.session),t._on_have_session_hook=null)}else t.session.document.replace_with_json(e),r.logger.debug("Updated existing session with new pulled doc")},function(t){throw t}).catch(function(t){null!=console.trace&&console.trace(t),r.logger.error("Failed to repull session "+t)})},t.prototype._on_open=function(t,e){var i=this;r.logger.info("Websocket connection "+this._number+" is now open"),this._pending_ack=[t,e],this._current_handler=function(t){i._awaiting_ack_handler(t)}},t.prototype._on_message=function(t){null==this._current_handler&&r.logger.error("Got a message with no current handler set");try{this._receiver.consume(t.data)}catch(t){this._close_bad_protocol(t.toString())}if(null!=this._receiver.message){var e=this._receiver.message,i=e.problem();null!=i&&this._close_bad_protocol(i),this._current_handler(e)}},t.prototype._on_close=function(t){var e=this;r.logger.info("Lost websocket "+this._number+" connection, "+t.code+" ("+t.reason+")"),this.socket=null,null!=this._pending_ack&&(this._pending_ack[1](new Error("Lost websocket connection, "+t.code+" ("+t.reason+")")),this._pending_ack=null);for(var i=function(){for(var t in e._pending_replies){var i=e._pending_replies[t];return delete e._pending_replies[t],i}return null},n=i();null!=n;)n[1]("Disconnected"),n=i();this.closed_permanently||this._schedule_reconnect(2e3)},t.prototype._on_error=function(t){r.logger.debug("Websocket error on socket "+this._number),t(new Error("Could not open websocket"))},t.prototype._close_bad_protocol=function(t){r.logger.error("Closing connection: "+t),null!=this.socket&&this.socket.close(1002,t)},t.prototype._awaiting_ack_handler=function(t){var e=this;"ACK"===t.msgtype()?(this._current_handler=function(t){return e._steady_state_handler(t)},this._repull_session_doc(),null!=this._pending_ack&&(this._pending_ack[0](this),this._pending_ack=null)):this._close_bad_protocol("First message was not an ACK")},t.prototype._steady_state_handler=function(t){if(t.reqid()in this._pending_replies){var e=this._pending_replies[t.reqid()];delete this._pending_replies[t.reqid()],e[0](t)}else this.session.handle(t)},t}();i.ClientConnection=c,i.pull_session=function(t,e,i){return new n.Promise(function(n,o){return new c(t,e,i,function(t){try{n(t)}catch(e){throw r.logger.error("Promise handler threw an error, closing session "+e),t.close(),e}},function(){o(new Error("Connection was closed before we successfully pulled a session"))}).connect().then(function(t){},function(t){throw r.logger.error("Failed to connect to Bokeh server "+t),t})})}},function(t,e,i){var n=t(14),r=t(50),o=t(260),s=function(){function t(t,e,i){var n=this;this._connection=t,this.document=e,this.id=i,this._document_listener=function(t){return n._document_changed(t)},this.document.on_change(this._document_listener),this.event_manager=this.document.event_manager,this.event_manager.session=this}return t.prototype.handle=function(t){var e=t.msgtype();"PATCH-DOC"===e?this._handle_patch(t):"OK"===e?this._handle_ok(t):"ERROR"===e?this._handle_error(t):n.logger.debug("Doing nothing with message "+t.msgtype())},t.prototype.close=function(){this._connection.close()},t.prototype.send_event=function(t){var e=o.Message.create("EVENT",{},JSON.stringify(t));this._connection.send(e)},t.prototype._connection_closed=function(){this.document.remove_on_change(this._document_listener)},t.prototype.request_server_info=function(){var t=o.Message.create("SERVER-INFO-REQ",{}),e=this._connection.send_with_reply(t);return e.then(function(t){return t.content})},t.prototype.force_roundtrip=function(){return this.request_server_info().then(function(t){})},t.prototype._document_changed=function(t){if(t.setter_id!==this.id&&(!(t instanceof r.ModelChangedEvent)||t.attr in t.model.serializable_attributes())){var e=o.Message.create("PATCH-DOC",{},this.document.create_json_patch([t]));this._connection.send(e)}},t.prototype._handle_patch=function(t){this.document.apply_json_patch(t.content,t.buffers,this.id)},t.prototype._handle_ok=function(t){n.logger.trace("Unhandled OK reply to "+t.reqid())},t.prototype._handle_error=function(t){n.logger.error("Unhandled ERROR reply to "+t.reqid()+": "+t.content.text)},t}();i.ClientSession=s},function(t,e,i){function n(t){return function(e){e.prototype.event_name=t,a[t]=e}}var r=t(379),o=t(14),s=t(32),a={};i.register_event_class=n,i.register_with_event=function(t){for(var e=[],i=1;i0&&(this._pending=!0);for(var h=0;h1)return r(t,i);var s={x:e.x+o*(i.x-e.x),y:e.y+o*(i.y-e.y)};return r(t,s)}var s=t(21),a=t(181);i.point_in_poly=function(t,e,i,n){for(var r=!1,o=i[i.length-1],s=n[n.length-1],a=0;an&&(s=[n,i],i=s[0],n=s[1]);r>o&&(a=[o,r],r=a[0],o=a[1]);return{minX:i,minY:r,maxX:n,maxY:o};var s,a},i.dist_2_pts=r,i.dist_to_segment_squared=o,i.dist_to_segment=function(t,e,i){return Math.sqrt(o(t,e,i))},i.check_2_segments_intersect=function(t,e,i,n,r,o,s,a){var l=(a-o)*(i-t)-(s-r)*(n-e);if(0==l)return{hit:!1,x:null,y:null};var h=e-o,c=t-r,u=(s-r)*h-(a-o)*c,_=(i-t)*h-(n-e)*c;c=_/l;var p=t+(h=u/l)*(i-t),d=e+h*(n-e);return{hit:h>0&&h<1&&c>0&&c<1,x:p,y:d}}},function(t,e,i){var n=t(13),r=t(21);i.vstack=function(t,e){var i=[];if(e.length>0){i.push(n.EQ(r.head(e)._bottom,[-1,t._bottom])),i.push(n.EQ(r.tail(e)._top,[-1,t._top])),i.push.apply(i,r.pairwise(e,function(t,e){return n.EQ(t._top,[-1,e._bottom])}));for(var o=0,s=e;o0){i.push(n.EQ(r.head(e)._right,[-1,t._right])),i.push(n.EQ(r.tail(e)._left,[-1,t._left])),i.push.apply(i,r.pairwise(e,function(t,e){return n.EQ(t._left,[-1,e._right])}));for(var o=0,s=e;o0){var n=r[e];return null==n&&(r[e]=n=new t(e,i)),n}throw new TypeError("Logger.get() expects a non-empty string name and an optional log-level")},Object.defineProperty(t.prototype,"level",{get:function(){return this.get_level()},enumerable:!0,configurable:!0}),t.prototype.get_level=function(){return this._log_level},t.prototype.set_level=function(e){if(e instanceof o)this._log_level=e;else{if(!n.isString(e)||null==t.log_levels[e])throw new Error("Logger.set_level() expects a log-level object or a string name of a log-level");this._log_level=t.log_levels[e]}var i="["+this._name+"]";for(var r in t.log_levels){var s=t.log_levels[r];s.level0){var p=this.source.selection_policy.hit_test(e,t);c=c||this.source.selection_policy.do_selection(p,this.source,i,n)}return c},e.prototype.inspect=function(t,e){var i=!1;if("GlyphRenderer"==t.model.type){var n=t.hit_test(e);i=!n.is_empty();var r=this.get_or_create_inspector(t.model);r.update(n,!0,!1),this.source.setv({inspected:r},{silent:!0}),this.source.inspect.emit([t,{geometry:e}])}else if(t.model instanceof s.GraphRenderer){var n=t.model.inspection_policy.hit_test(e,t);i=i||t.model.inspection_policy.do_inspection(n,e,t,!1,!1)}return i},e.prototype.clear=function(t){this.source.selected.clear(),null!=t&&this.get_or_create_inspector(t.model).clear()},e.prototype.get_or_create_inspector=function(t){return null==this.inspectors[t.id]&&(this.inspectors[t.id]=new o.Selection),this.inspectors[t.id]},e}(r.HasProps);i.SelectionManager=l,l.initClass()},function(t,e,i){var n=function(){function t(){this._dev=!1}return Object.defineProperty(t.prototype,"dev",{get:function(){return this._dev},set:function(t){this._dev=t},enumerable:!0,configurable:!0}),t}();i.Settings=n,i.settings=new n},function(t,e,i){function n(t,e,i,n){return l.find(t,function(t){return t.signal===e&&t.slot===i&&t.context===n})}function r(t){0===p.size&&a.defer(o),p.add(t)}function o(){p.forEach(function(t){l.removeBy(t,function(t){return null==t.signal})}),p.clear()}var s=t(379),a=t(25),l=t(21),h=function(){function t(t,e){this.sender=t,this.name=e}return t.prototype.connect=function(t,e){void 0===e&&(e=null),u.has(this.sender)||u.set(this.sender,[]);var i=u.get(this.sender);if(null!=n(i,this,t,e))return!1;var r=e||t;_.has(r)||_.set(r,[]);var o=_.get(r),s={signal:this,slot:t,context:e};return i.push(s),o.push(s),!0},t.prototype.disconnect=function(t,e){void 0===e&&(e=null);var i=u.get(this.sender);if(null==i||0===i.length)return!1;var o=n(i,this,t,e);if(null==o)return!1;var s=e||t,a=_.get(s);return o.signal=null,r(i),r(a),!0},t.prototype.emit=function(t){for(var e=u.get(this.sender)||[],i=0,n=e;i0;var p=function(){function t(t,e,i,n){this.plot_view=t,this.toolbar=e,this.hit_area=i,this.plot=n,this.pan_start=new o.Signal(this,"pan:start"),this.pan=new o.Signal(this,"pan"),this.pan_end=new o.Signal(this,"pan:end"),this.pinch_start=new o.Signal(this,"pinch:start"),this.pinch=new o.Signal(this,"pinch"),this.pinch_end=new o.Signal(this,"pinch:end"),this.rotate_start=new o.Signal(this,"rotate:start"),this.rotate=new o.Signal(this,"rotate"),this.rotate_end=new o.Signal(this,"rotate:end"),this.tap=new o.Signal(this,"tap"),this.doubletap=new o.Signal(this,"doubletap"),this.press=new o.Signal(this,"press"),this.move_enter=new o.Signal(this,"move:enter"),this.move=new o.Signal(this,"move"),this.move_exit=new o.Signal(this,"move:exit"),this.scroll=new o.Signal(this,"scroll"),this.keydown=new o.Signal(this,"keydown"),this.keyup=new o.Signal(this,"keyup"),this.hammer=new r(this.hit_area),this._configure_hammerjs()}return t.prototype._configure_hammerjs=function(){var t=this;this.hammer.get("doubletap").recognizeWith("tap"),this.hammer.get("tap").requireFailure("doubletap"),this.hammer.get("doubletap").dropRequireFailure("tap"),this.hammer.on("doubletap",function(e){return t._doubletap(e)}),this.hammer.on("tap",function(e){return t._tap(e)}),this.hammer.on("press",function(e){return t._press(e)}),this.hammer.get("pan").set({direction:r.DIRECTION_ALL}),this.hammer.on("panstart",function(e){return t._pan_start(e)}),this.hammer.on("pan",function(e){return t._pan(e)}),this.hammer.on("panend",function(e){return t._pan_end(e)}),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("pinchstart",function(e){return t._pinch_start(e)}),this.hammer.on("pinch",function(e){return t._pinch(e)}),this.hammer.on("pinchend",function(e){return t._pinch_end(e)}),this.hammer.get("rotate").set({enable:!0}),this.hammer.on("rotatestart",function(e){return t._rotate_start(e)}),this.hammer.on("rotate",function(e){return t._rotate(e)}),this.hammer.on("rotateend",function(e){return t._rotate_end(e)}),this.hit_area.addEventListener("mousemove",function(e){return t._mouse_move(e)}),this.hit_area.addEventListener("mouseenter",function(e){return t._mouse_enter(e)}),this.hit_area.addEventListener("mouseleave",function(e){return t._mouse_exit(e)}),this.hit_area.addEventListener("wheel",function(e){return t._mouse_wheel(e)}),document.addEventListener("keydown",function(e){return t._key_down(e)}),document.addEventListener("keyup",function(e){return t._key_up(e)})},t.prototype.register_tool=function(t){var e=this,i=t.model.event_type;null!=i&&(u.isString(i)?this._register_tool(t,i):i.forEach(function(i,n){return e._register_tool(t,i,n<1)}))},t.prototype._register_tool=function(t,e,n){void 0===n&&(n=!0);var r=t,o=r.model.id,a=function(t){return function(e){e.id==o&&t(e.e)}},l=function(t){return function(e){t(e.e)}};switch(e){case"pan":null!=r._pan_start&&r.connect(this.pan_start,a(r._pan_start.bind(r))),null!=r._pan&&r.connect(this.pan,a(r._pan.bind(r))),null!=r._pan_end&&r.connect(this.pan_end,a(r._pan_end.bind(r)));break;case"pinch":null!=r._pinch_start&&r.connect(this.pinch_start,a(r._pinch_start.bind(r))),null!=r._pinch&&r.connect(this.pinch,a(r._pinch.bind(r))),null!=r._pinch_end&&r.connect(this.pinch_end,a(r._pinch_end.bind(r)));break;case"rotate":null!=r._rotate_start&&r.connect(this.rotate_start,a(r._rotate_start.bind(r))),null!=r._rotate&&r.connect(this.rotate,a(r._rotate.bind(r))),null!=r._rotate_end&&r.connect(this.rotate_end,a(r._rotate_end.bind(r)));break;case"move":null!=r._move_enter&&r.connect(this.move_enter,a(r._move_enter.bind(r))),null!=r._move&&r.connect(this.move,a(r._move.bind(r))),null!=r._move_exit&&r.connect(this.move_exit,a(r._move_exit.bind(r)));break;case"tap":null!=r._tap&&r.connect(this.tap,a(r._tap.bind(r)));break;case"press":null!=r._press&&r.connect(this.press,a(r._press.bind(r)));break;case"scroll":null!=r._scroll&&r.connect(this.scroll,a(r._scroll.bind(r)));break;default:throw new Error("unsupported event_type: "+e)}n&&(null!=r._doubletap&&r.connect(this.doubletap,l(r._doubletap.bind(r))),null!=r._keydown&&r.connect(this.keydown,l(r._keydown.bind(r))),null!=r._keyup&&r.connect(this.keyup,l(r._keyup.bind(r))),i.is_mobile&&null!=r._scroll&&"pinch"==e&&(s.logger.debug("Registering scroll on touch screen"),r.connect(this.scroll,a(r._scroll.bind(r)))))},t.prototype._hit_test_renderers=function(t,e){for(var i=this.plot_view.get_renderer_views(),n=0,r=h.reversed(i);n0,"'step' must be a positive number"),null==e&&(e=t,t=0);for(var n=Math.max,r=Math.ceil,o=Math.abs,s=t<=e?i:-i,a=n(r(o(e-t)/i),0),l=Array(a),c=0;c0?0:n-1;r>=0&&r=0?e:t.length+e]},i.zip=function(t,e){for(var i=Math.min(t.length,e.length),n=new Array(i),r=0;rn||void 0===i)return 1;if(io&&(e=o),null==i||i>o-e?i=o-e:i<0&&(i=0);for(var s=o-i+n.length,a=new t.constructor(s),l=0;li&&(i=e);return i},i.maxBy=function(t,e){if(0==t.length)throw new Error("maxBy() called with an empty array");for(var i=t[0],n=e(i),r=1,o=t.length;rn&&(i=s,n=a)}return i},i.sum=function(t){for(var e=0,i=0,n=t.length;i=0&&c>=0))throw new Error("invalid bbox {x: "+a+", y: "+l+", width: "+h+", height: "+c+"}");this.x0=a,this.y0=l,this.x1=a+h,this.y1=l+c}}return Object.defineProperty(t.prototype,"minX",{get:function(){return this.x0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"minY",{get:function(){return this.y0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxX",{get:function(){return this.x1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxY",{get:function(){return this.y1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this.x0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"p0",{get:function(){return[this.x0,this.y0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"p1",{get:function(){return[this.x1,this.y1]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"x",{get:function(){return this.x0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.y0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.x1-this.x0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.y1-this.y0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rect",{get:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"h_range",{get:function(){return{start:this.x0,end:this.x1}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"v_range",{get:function(){return{start:this.y0,end:this.y1}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ranges",{get:function(){return[this.h_range,this.v_range]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"aspect",{get:function(){return this.width/this.height},enumerable:!0,configurable:!0}),t.prototype.contains=function(t,e){return t>=this.x0&&t<=this.x1&&e>=this.y0&&e<=this.y1},t.prototype.clip=function(t,e){return tthis.x1&&(t=this.x1),ethis.y1&&(e=this.y1),[t,e]},t.prototype.union=function(e){return new t({x0:n(this.x0,e.x0),y0:n(this.y0,e.y0),x1:r(this.x1,e.x1),y1:r(this.y1,e.y1)})},t}();i.BBox=o},function(t,e,i){i.delay=function(t,e){return setTimeout(t,e)};var n="function"==typeof requestAnimationFrame?requestAnimationFrame:setImmediate;i.defer=function(t){return n(t)},i.throttle=function(t,e,i){void 0===i&&(i={});var n,r,o,s=null,a=0,l=function(){a=!1===i.leading?0:Date.now(),s=null,o=t.apply(n,r),s||(n=r=null)};return function(){var h=Date.now();a||!1!==i.leading||(a=h);var c=e-(h-a);return n=this,r=arguments,c<=0||c>e?(s&&(clearTimeout(s),s=null),a=h,o=t.apply(n,r),s||(n=r=null)):s||!1===i.trailing||(s=setTimeout(l,c)),o}},i.once=function(t){var e,i=!1;return function(){return i||(i=!0,e=t()),e}}},function(t,e,i){i.fixup_ctx=function(t){(function(t){t.setLineDash||(t.setLineDash=function(e){t.mozDash=e,t.webkitLineDash=e});t.getLineDash||(t.getLineDash=function(){return t.mozDash})})(t),function(t){t.setLineDashOffset=function(e){t.lineDashOffset=e,t.mozDashOffset=e,t.webkitLineDashOffset=e},t.getLineDashOffset=function(){return t.mozDashOffset}}(t),function(t){t.setImageSmoothingEnabled=function(e){t.imageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e,t.oImageSmoothingEnabled=e,t.webkitImageSmoothingEnabled=e,t.msImageSmoothingEnabled=e},t.getImageSmoothingEnabled=function(){var e=t.imageSmoothingEnabled;return null==e||e}}(t),function(t){t.measureText&&null==t.html5MeasureText&&(t.html5MeasureText=t.measureText,t.measureText=function(e){var i=t.html5MeasureText(e);return i.ascent=1.6*t.html5MeasureText("m").width,i})}(t),function(t){t.ellipse||(t.ellipse=function(e,i,n,r,o,s,a,l){void 0===l&&(l=!1);t.translate(e,i),t.rotate(o);var h=n,c=r;l&&(h=-n,c=-r);t.moveTo(-h,0),t.bezierCurveTo(-h,.551784*c,.551784*-h,c,0,c),t.bezierCurveTo(.551784*h,c,h,.551784*c,h,0),t.bezierCurveTo(h,.551784*-c,.551784*h,-c,0,-c),t.bezierCurveTo(.551784*-h,-c,-h,.551784*-c,-h,0),t.rotate(-o),t.translate(-e,-i)})}(t)},i.get_scale_ratio=function(t,e,i){if("svg"==i)return 1;if(e){var n=window.devicePixelRatio||1,r=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return n/r}return 1}},function(t,e,i){function n(t){var e=Number(t).toString(16);return 1==e.length?"0"+e:e}function r(t){if(0==(t+="").indexOf("#"))return t;if(o.is_svg_color(t))return o.svg_colors[t];if(0==t.indexOf("rgb")){var e=t.replace(/^rgba?\(|\s+|\)$/g,"").split(","),i=e.slice(0,3).map(n).join("");return 4==e.length&&(i+=n(Math.floor(255*parseFloat(e[3])))),"#"+i.slice(0,8)}return t}var o=t(39),s=t(21);i.color2hex=r,i.color2rgba=function(t,e){void 0===e&&(e=1);if(!t)return[0,0,0,0];var i=r(t);(i=i.replace(/ |#/g,"")).length<=4&&(i=i.replace(/(.)/g,"$1$1"));var n=i.match(/../g).map(function(t){return parseInt(t,16)/255});for(;n.length<3;)n.push(0);n.length<4&&n.push(e);return n.slice(0,4)},i.valid_rgb=function(t){var e;switch(t.substring(0,4)){case"rgba":e={start:"rgba(",len:4,alpha:!0};break;case"rgb(":e={start:"rgb(",len:3,alpha:!1};break;default:return!1}if(new RegExp(".*?(\\.).*(,)").test(t))throw new Error("color expects integers for rgb in rgb/rgba tuple, received "+t);var i=t.replace(e.start,"").replace(")","").split(",").map(parseFloat);if(i.length!=e.len)throw new Error("color expects rgba "+e.len+"-tuple, received "+t);if(e.alpha&&!(0<=i[3]&&i[3]<=1))throw new Error("color expects rgba 4-tuple to have alpha value between 0 and 1");if(s.includes(i.slice(0,3).map(function(t){return 0<=t&&t<=255}),!1))throw new Error("color expects rgb to have value between 0 and 255");return!0}},function(t,e,i){i.is_ie=navigator.userAgent.indexOf("MSIE")>=0||navigator.userAgent.indexOf("Trident")>0||navigator.userAgent.indexOf("Edge")>0,i.is_little_endian=function(){var t=new ArrayBuffer(4),e=new Uint8Array(t),i=new Uint32Array(t);i[1]=168496141;var n=!0;return 10==e[4]&&11==e[5]&&12==e[6]&&13==e[7]&&(n=!1),n}()},function(t,e,i){var n=t(21),r=t(30),o=t(44),s=function(){function t(){this._dict={}}return t.prototype._existing=function(t){return t in this._dict?this._dict[t]:null},t.prototype.add_value=function(t,e){var i=this._existing(t);null==i?this._dict[t]=e:o.isArray(i)?i.push(e):this._dict[t]=[i,e]},t.prototype.remove_value=function(t,e){var i=this._existing(t);if(o.isArray(i)){var s=n.difference(i,[e]);s.length>0?this._dict[t]=s:delete this._dict[t]}else r.isEqual(i,e)&&delete this._dict[t]},t.prototype.get_one=function(t,e){var i=this._existing(t);if(o.isArray(i)){if(1===i.length)return i[0];throw new Error(e)}return i},t}();i.MultiDict=s;var a=function(){function t(e){this.values=null==e?[]:e instanceof t?n.copy(e.values):this._compact(e)}return t.prototype._compact=function(t){for(var e=[],i=0,n=t;i2*Math.PI;)t-=2*Math.PI;return t}function r(t,e){return Math.abs(n(t-e))}function o(){return Math.random()}i.angle_norm=n,i.angle_dist=r,i.angle_between=function(t,e,i,o){var s=n(t),a=r(e,i),l=r(e,s)<=a&&r(s,i)<=a;return"anticlock"==o?l:!l},i.random=o,i.randomIn=function(t,e){null==e&&(e=t,t=0);return t+Math.floor(Math.random()*(e-t+1))},i.atan2=function(t,e){return Math.atan2(e[1]-t[1],e[0]-t[0])},i.rnorm=function(t,e){var i,n;for(;i=o(),n=o(),n=(2*n-1)*Math.sqrt(1/Math.E*2),!(-4*i*i*Math.log(i)>=n*n););var r=n/i;return r=t+e*r},i.clamp=function(t,e,i){return t>i?i:th[e][0]&&t0?e["1d"].indices:e["2d"].indices.length>0?e["2d"].indices:[]}},function(t,e,i){function n(t){for(var e=new Uint8Array(t.buffer,t.byteOffset,2*t.length),i=0,n=e.length;i"'`])/g,function(t){switch(t){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case"'":return"'";case"`":return"`";default:return t}})},i.unescape=function(t){return t.replace(/&(amp|lt|gt|quot|#x27|#x60);/g,function(t,e){switch(e){case"amp":return"&";case"lt":return"<";case"gt":return">";case"quot":return'"';case"#x27":return"'";case"#x60":return"`";default:return e}})}},function(t,e,i){i.svg_colors={indianred:"#CD5C5C",lightcoral:"#F08080",salmon:"#FA8072",darksalmon:"#E9967A",lightsalmon:"#FFA07A",crimson:"#DC143C",red:"#FF0000",firebrick:"#B22222",darkred:"#8B0000",pink:"#FFC0CB",lightpink:"#FFB6C1",hotpink:"#FF69B4",deeppink:"#FF1493",mediumvioletred:"#C71585",palevioletred:"#DB7093",coral:"#FF7F50",tomato:"#FF6347",orangered:"#FF4500",darkorange:"#FF8C00",orange:"#FFA500",gold:"#FFD700",yellow:"#FFFF00",lightyellow:"#FFFFE0",lemonchiffon:"#FFFACD",lightgoldenrodyellow:"#FAFAD2",papayawhip:"#FFEFD5",moccasin:"#FFE4B5",peachpuff:"#FFDAB9",palegoldenrod:"#EEE8AA",khaki:"#F0E68C",darkkhaki:"#BDB76B",lavender:"#E6E6FA",thistle:"#D8BFD8",plum:"#DDA0DD",violet:"#EE82EE",orchid:"#DA70D6",fuchsia:"#FF00FF",magenta:"#FF00FF",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",blueviolet:"#8A2BE2",darkviolet:"#9400D3",darkorchid:"#9932CC",darkmagenta:"#8B008B",purple:"#800080",indigo:"#4B0082",slateblue:"#6A5ACD",darkslateblue:"#483D8B",mediumslateblue:"#7B68EE",greenyellow:"#ADFF2F",chartreuse:"#7FFF00",lawngreen:"#7CFC00",lime:"#00FF00",limegreen:"#32CD32",palegreen:"#98FB98",lightgreen:"#90EE90",mediumspringgreen:"#00FA9A",springgreen:"#00FF7F",mediumseagreen:"#3CB371",seagreen:"#2E8B57",forestgreen:"#228B22",green:"#008000",darkgreen:"#006400",yellowgreen:"#9ACD32",olivedrab:"#6B8E23",olive:"#808000",darkolivegreen:"#556B2F",mediumaquamarine:"#66CDAA",darkseagreen:"#8FBC8F",lightseagreen:"#20B2AA",darkcyan:"#008B8B",teal:"#008080",aqua:"#00FFFF",cyan:"#00FFFF",lightcyan:"#E0FFFF",paleturquoise:"#AFEEEE",aquamarine:"#7FFFD4",turquoise:"#40E0D0",mediumturquoise:"#48D1CC",darkturquoise:"#00CED1",cadetblue:"#5F9EA0",steelblue:"#4682B4",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",lightblue:"#ADD8E6",skyblue:"#87CEEB",lightskyblue:"#87CEFA",deepskyblue:"#00BFFF",dodgerblue:"#1E90FF",cornflowerblue:"#6495ED",royalblue:"#4169E1",blue:"#0000FF",mediumblue:"#0000CD",darkblue:"#00008B",navy:"#000080",midnightblue:"#191970",cornsilk:"#FFF8DC",blanchedalmond:"#FFEBCD",bisque:"#FFE4C4",navajowhite:"#FFDEAD",wheat:"#F5DEB3",burlywood:"#DEB887",tan:"#D2B48C",rosybrown:"#BC8F8F",sandybrown:"#F4A460",goldenrod:"#DAA520",darkgoldenrod:"#B8860B",peru:"#CD853F",chocolate:"#D2691E",saddlebrown:"#8B4513",sienna:"#A0522D",brown:"#A52A2A",maroon:"#800000",white:"#FFFFFF",snow:"#FFFAFA",honeydew:"#F0FFF0",mintcream:"#F5FFFA",azure:"#F0FFFF",aliceblue:"#F0F8FF",ghostwhite:"#F8F8FF",whitesmoke:"#F5F5F5",seashell:"#FFF5EE",beige:"#F5F5DC",oldlace:"#FDF5E6",floralwhite:"#FFFAF0",ivory:"#FFFFF0",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lavenderblush:"#FFF0F5",mistyrose:"#FFE4E1",gainsboro:"#DCDCDC",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",silver:"#C0C0C0",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",gray:"#808080",grey:"#808080",dimgray:"#696969",dimgrey:"#696969",lightslategray:"#778899",lightslategrey:"#778899",slategray:"#708090",slategrey:"#708090",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",black:"#000000"},i.is_svg_color=function(t){return t in i.svg_colors}},function(t,e,i){var n=t(377),r=t(347),o=t(378),s=t(38),a=t(44);i.replace_placeholders=function(t,e,i,l,h){void 0===l&&(l=null);void 0===h&&(h={});return t=t.replace(/(^|[^\$])\$(\w+)/g,function(t,e,i){return e+"@$"+i}),t=t.replace(/(^|[^@])@(?:(\$?\w+)|{([^{}]+)})(?:{([^{}]+)})?/g,function(t,c,u,_,p){var d;if("$"==(u=null!=_?_:u)[0])d=h[u.substring(1)];else{var f=e.get_column(u);null!=f&&(d=f[i])}var v=null;if(null==d)v="???";else{if("safe"==p)return""+c+d;if(null!=p)if(null!=l&&u in l){var m=l[u];switch(m){case"numeral":v=r.format(d,p);break;case"datetime":v=o(d,p);break;case"printf":v=n.sprintf(p,d);break;default:throw new Error("Unknown tooltip field formatter type '"+m+"'")}}else v=r.format(d,p);else v=function(t){if(a.isNumber(t)){var e=function(){switch(!1){case Math.floor(t)!=t:return"%d";case!(Math.abs(t)>.1&&Math.abs(t)<1e3):return"%0.3f";default:return"%0.3e"}}();return n.sprintf(e,t)}return""+t}(d)}return""+c+s.escape(v)})}},function(t,e,i){var n=t(5),r={};i.get_text_height=function(t){if(null!=r[t])return r[t];var e=n.span({style:{font:t}},"Hg"),i=n.div({style:{display:"inline-block",width:"1px",height:"0px"}}),o=n.div({},e,i);document.body.appendChild(o);try{i.style.verticalAlign="baseline";var s=n.offset(i).top-n.offset(e).top;i.style.verticalAlign="bottom";var a=n.offset(i).top-n.offset(e).top,l={height:a,ascent:s,descent:a-s};return r[t]=l,l}finally{document.body.removeChild(o)}}},function(t,e,i){var n=("undefined"!=typeof window?window.requestAnimationFrame:void 0)||("undefined"!=typeof window?window.webkitRequestAnimationFrame:void 0)||("undefined"!=typeof window?window.mozRequestAnimationFrame:void 0)||("undefined"!=typeof window?window.msRequestAnimationFrame:void 0)||function(t){return t(Date.now()),-1};i.throttle=function(t,e){var i=null,r=0,o=!1,s=function(){r=Date.now(),i=null,o=!1,t()};return function(){var t=Date.now(),a=e-(t-r);a<=0&&!o?(null!=i&&clearTimeout(i),o=!0,n(s)):i||o||(i=setTimeout(function(){return n(s)},a))}}},function(t,e,i){i.concat=function(t){for(var e=[],i=1;i0;)this.remove_root(this._roots[0])}finally{this._pop_all_models_freeze()}},t.prototype.interactive_start=function(t){null==this._interactive_plot&&(this._interactive_plot=t,this._interactive_plot.trigger_event(new a.LODStart({}))),this._interactive_timestamp=Date.now()},t.prototype.interactive_stop=function(t){null!=this._interactive_plot&&this._interactive_plot.id===t.id&&this._interactive_plot.trigger_event(new a.LODEnd({})),this._interactive_plot=null,this._interactive_timestamp=null},t.prototype.interactive_duration=function(){return null==this._interactive_timestamp?-1:Date.now()-this._interactive_timestamp},t.prototype.destructively_move=function(t){if(t===this)throw new Error("Attempted to overwrite a document with itself");t.clear();var e=p.copy(this._roots);this.clear();for(var i=0,n=e;i=0&&this._callbacks.splice(e,1)},t.prototype._trigger_on_change=function(t){for(var e=0,i=this._callbacks;e0||p.difference(f,a).length>0)throw new Error("Not implemented: computing add/remove of document roots");var g={},y=[];for(var b in i._all_models)if(b in o){var x=t._events_to_sync_objects(o[b],u[b],i,g);y=y.concat(x)}return{references:t._references_json(d.values(g),!1),events:y}},t.prototype.to_json_string=function(t){return void 0===t&&(t=!0),JSON.stringify(this.to_json(t))},t.prototype.to_json=function(e){void 0===e&&(e=!0);var i=this._roots.map(function(t){return t.id}),n=d.values(this._all_models);return{title:this._title,roots:{root_ids:i,references:t._references_json(n,e)}}},t.from_json_string=function(e){var i=JSON.parse(e);return t.from_json(i)},t.from_json=function(e){s.logger.debug("Creating Document from JSON");var i=e.version,n=-1!==i.indexOf("+")||-1!==i.indexOf("-"),r="Library versions: JS ("+o.version+") / Python ("+i+")";n||o.version===i?s.logger.debug(r):(s.logger.warn("JS/Python version mismatch"),s.logger.warn(r));var a=e.roots,l=a.root_ids,h=a.references,c=t._instantiate_references_json(h,{});t._initialize_references_json(h,{},c);for(var u=new t,_=0,p=l;_0?t.consume(e.buffers[0].buffer):t.consume(e.content.data);var i=t.message;null!=i&&this.apply_json_patch(i.content,i.buffers)}function r(t,e){if("undefined"!=typeof Jupyter&&null!=Jupyter.notebook.kernel){d.logger.info("Registering Jupyter comms for target "+t);var r=Jupyter.notebook.kernel.comm_manager;try{r.register_target(t,function(i){d.logger.info("Registering Jupyter comms for target "+t);var r=new x.Receiver;i.on_msg(n.bind(e,r))})}catch(t){d.logger.warn("Jupyter comms failed to register. push_notebook() will not function. (exception reported: "+t+")")}}else if(e.roots()[0].id in i.kernels){d.logger.info("Registering JupyterLab comms for target "+t);var o=i.kernels[e.roots()[0].id];try{o.registerCommTarget(t,function(i){d.logger.info("Registering JupyterLab comms for target "+t);var r=new x.Receiver;i.onMsg=n.bind(e,r)})}catch(t){d.logger.warn("Jupyter comms failed to register. push_notebook() will not function. (exception reported: "+t+")")}}else console.warn("Jupyter notebooks comms not available. push_notebook() will not function. If running JupyterLab ensure the latest jupyterlab_bokeh extension is installed. In an exported notebook this warning is expected.")}function o(t){var e=new t.default_view({model:t,parent:null});return p.index[t.id]=e,e}function s(t){var e=t.elementid,n=document.getElementById(e);if(null==n)throw new Error("Error rendering Bokeh model: could not find tag with id: "+e);if(!document.body.contains(n))throw new Error("Error rendering Bokeh model: element with id '"+e+"' must be under ");if("SCRIPT"==n.tagName){!function(t,e){var i=t.dataset,n=i.bokehLogLevel,r=i.bokehDocId,o=i.bokehModelId,s=i.bokehSessionId;null!=n&&n.length>0&&d.set_log_level(n);null!=r&&r.length>0&&(e.docid=r);null!=o&&o.length>0&&(e.modelid=o);null!=s&&s.length>0&&(e.sessionid=s);d.logger.info("Will inject Bokeh script tag with params "+JSON.stringify(e))}(n,t);var r=v.div({class:i.BOKEH_ROOT});v.replaceWith(n,r);var o=v.div();r.appendChild(o),n=o}return n}function a(t,e,i){var n=i.get_model_by_id(t);if(null==n)throw new Error("Model "+t+" was not in document "+i);var r=o(n);return r.renderTo(e,!0),r}function l(t,e,i){function n(t){var i=o(t);i.renderTo(e),r[t.id]=i}void 0===i&&(i=!1);for(var r={},s=0,a=t.roots();s=0;e--)t.lineTo(this._upper_sx[e],this._upper_sy[e]);t.closePath(),this.visuals.fill.doit&&(this.visuals.fill.set_value(t),t.fill()),t.beginPath(),t.moveTo(this._lower_sx[0],this._lower_sy[0]);for(var e=0,i=this._lower_sx.length;el||(_[r].push(c[f]),_[o].push(0));for(var f=0,v=u.length;fl||(p[r].push(u[f]),p[o].push(0));var m={major:this._format_major_labels(_[r],c)},g={major:[[],[]],minor:[[],[]]};return g.major[r]=i.v_compute(_[r]),g.minor[r]=i.v_compute(p[r]),g.major[o]=_[o],g.minor[o]=p[o],"vertical"==this.orientation&&(g.major[r]=d.map(g.major[r],function(e){return t-e}),g.minor[r]=d.map(g.minor[r],function(e){return t-e})),{coords:g,labels:m}},e}(r.Annotation);i.ColorBar=g,g.initClass()},function(t,e,i){var n=t(54);i.Annotation=n.Annotation;var r=t(55);i.Arrow=r.Arrow;var o=t(56);i.ArrowHead=o.ArrowHead;var s=t(56);i.OpenHead=s.OpenHead;var a=t(56);i.NormalHead=a.NormalHead;var l=t(56);i.TeeHead=l.TeeHead;var h=t(56);i.VeeHead=h.VeeHead;var c=t(57);i.Band=c.Band;var u=t(58);i.BoxAnnotation=u.BoxAnnotation;var _=t(59);i.ColorBar=_.ColorBar;var p=t(61);i.Label=p.Label;var d=t(62);i.LabelSet=d.LabelSet;var f=t(63);i.Legend=f.Legend;var v=t(64);i.LegendItem=v.LegendItem;var m=t(65);i.PolyAnnotation=m.PolyAnnotation;var g=t(66);i.Span=g.Span;var y=t(67);i.TextAnnotation=y.TextAnnotation;var b=t(68);i.Title=b.Title;var x=t(69);i.ToolbarPanel=x.ToolbarPanel;var w=t(70);i.Tooltip=w.Tooltip;var k=t(71);i.Whisker=k.Whisker},function(t,e,i){var n=t(379),r=t(67),o=t(5),s=t(15),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.initialize=function(e){t.prototype.initialize.call(this,e),this.visuals.warm_cache()},e.prototype._get_size=function(){var t=this.plot_view.canvas_view.ctx;if(this.visuals.text.set_value(t),this.model.panel.is_horizontal){var e=t.measureText(this.model.text).ascent;return e}var i=t.measureText(this.model.text).width;return i},e.prototype.render=function(){if(this.model.visible||"css"!=this.model.render_mode||o.hide(this.el),this.model.visible){var t;switch(this.model.angle_units){case"rad":t=-this.model.angle;break;case"deg":t=-this.model.angle*Math.PI/180;break;default:throw new Error("unreachable code")}var e=null!=this.model.panel?this.model.panel:this.plot_view.frame,i=this.plot_view.frame.xscales[this.model.x_range_name],n=this.plot_view.frame.yscales[this.model.y_range_name],r="data"==this.model.x_units?i.compute(this.model.x):e.xview.compute(this.model.x),s="data"==this.model.y_units?n.compute(this.model.y):e.yview.compute(this.model.y);r+=this.model.x_offset,s-=this.model.y_offset;var a="canvas"==this.model.render_mode?this._canvas_text.bind(this):this._css_text.bind(this);a(this.plot_view.canvas_view.ctx,this.model.text,r,s,t)}},e}(r.TextAnnotationView);i.LabelView=a;var l=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="Label",this.prototype.default_view=a,this.mixins(["text","line:border_","fill:background_"]),this.define({x:[s.Number],x_units:[s.SpatialUnits,"data"],y:[s.Number],y_units:[s.SpatialUnits,"data"],text:[s.String],angle:[s.Angle,0],angle_units:[s.AngleUnits,"rad"],x_offset:[s.Number,0],y_offset:[s.Number,0],x_range_name:[s.String,"default"],y_range_name:[s.String,"default"]}),this.override({background_fill_color:null,border_line_color:null})},e}(r.TextAnnotation);i.Label=l,l.initClass()},function(t,e,i){var n=t(379),r=t(67),o=t(184),s=t(5),a=t(15),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.initialize=function(e){if(t.prototype.initialize.call(this,e),this.set_data(this.model.source),"css"==this.model.render_mode)for(var i=0,n=this._text.length;i0?(this.el.style.top=v+"px",this.el.style.left=f+"px"):s.hide(this.el)}},e}(o.AnnotationView);i.TooltipView=l;var h=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.initClass=function(){this.prototype.type="Tooltip",this.prototype.default_view=l,this.define({attachment:[a.String,"horizontal"],inner_only:[a.Bool,!0],show_arrow:[a.Bool,!0]}),this.override({level:"overlay"}),this.internal({data:[a.Any,[]],custom:[a.Any]})},e.prototype.clear=function(){this.data=[]},e.prototype.add=function(t,e,i){this.data=this.data.concat([[t,e,i]])},e}(o.Annotation);i.Tooltip=h,h.initClass()},function(t,e,i){var n=t(379),r=t(54),o=t(184),s=t(56),a=t(15),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.initialize=function(e){t.prototype.initialize.call(this,e),this.set_data(this.model.source)},e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),this.connect(this.model.source.streaming,function(){return e.set_data(e.model.source)}),this.connect(this.model.source.patching,function(){return e.set_data(e.model.source)}),this.connect(this.model.source.change,function(){return e.set_data(e.model.source)})},e.prototype.set_data=function(e){t.prototype.set_data.call(this,e),this.visuals.warm_cache(e),this.plot_view.request_render()},e.prototype._map_data=function(){var t,e=this.plot_model.frame,i=this.model.dimension,n=e.xscales[this.model.x_range_name],r=e.yscales[this.model.y_range_name],o="height"==i?r:n,s="height"==i?n:r,a="height"==i?e.yview:e.xview,l="height"==i?e.xview:e.yview;t="data"==this.model.lower.units?o.v_compute(this._lower):a.v_compute(this._lower);var h;h="data"==this.model.upper.units?o.v_compute(this._upper):a.v_compute(this._upper);var c;c="data"==this.model.base.units?s.v_compute(this._base):l.v_compute(this._base);var u="height"==i?[1,0]:[0,1],_=u[0],p=u[1],d=[t,c],f=[h,c];this._lower_sx=d[_],this._lower_sy=d[p],this._upper_sx=f[_],this._upper_sy=f[p]},e.prototype.render=function(){if(this.model.visible){this._map_data();var t=this.plot_view.canvas_view.ctx;if(this.visuals.line.doit)for(var e=0,i=this._lower_sx.length;eu&&(u=f)}return u>0&&(u+=n),u},e}(r.GuideRendererView);i.AxisView=_;var p=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="Axis",this.prototype.default_view=_,this.mixins(["line:axis_","line:major_tick_","line:minor_tick_","text:major_label_","text:axis_label_"]),this.define({bounds:[o.Any,"auto"],ticker:[o.Instance,null],formatter:[o.Instance,null],x_range_name:[o.String,"default"],y_range_name:[o.String,"default"],axis_label:[o.String,""],axis_label_standoff:[o.Int,5],major_label_standoff:[o.Int,5],major_label_orientation:[o.Any,"horizontal"],major_label_overrides:[o.Any,{}],major_tick_in:[o.Number,2],major_tick_out:[o.Number,6],minor_tick_in:[o.Number,0],minor_tick_out:[o.Number,4]}),this.override({axis_line_color:"black",major_tick_line_color:"black",minor_tick_line_color:"black",major_label_text_font_size:"8pt",major_label_text_align:"center",major_label_text_baseline:"alphabetic",axis_label_text_font_size:"10pt",axis_label_text_font_style:"italic"})},e.prototype.add_panel=function(t){this.panel=new s.SidePanel({side:t}),this.panel.attach_document(this.document)},Object.defineProperty(e.prototype,"normals",{get:function(){return this.panel.normals},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dimension",{get:function(){return this.panel.dimension},enumerable:!0,configurable:!0}),e.prototype.compute_labels=function(t){for(var e=this.formatter.doFormat(t,this),i=0;ih(a-_)?(n=u(c(o,s),a),r=c(u(o,s),_)):(n=c(o,s),r=u(o,s)),[n,r]}throw new Error("user bounds '"+e+"' not understood")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rule_coords",{get:function(){var t=this.dimension,e=(t+1)%2,i=this.ranges[0],n=this.computed_bounds,r=n[0],o=n[1],s=new Array(2),a=new Array(2),l=[s,a];return l[t][0]=Math.max(r,i.min),l[t][1]=Math.min(o,i.max),l[t][0]>l[t][1]&&(l[t][0]=l[t][1]=NaN),l[e][0]=this.loc,l[e][1]=this.loc,l},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tick_coords",{get:function(){for(var t=this.dimension,e=(t+1)%2,i=this.ranges[0],n=this.computed_bounds,r=n[0],o=n[1],s=this.ticker.get_ticks(r,o,i,this.loc,{}),a=s.major,l=s.minor,h=[[],[]],c=[[],[]],u=[i.min,i.max],_=u[0],p=u[1],d=0;dp||(h[t].push(a[d]),h[e].push(this.loc));for(var d=0;dp||(c[t].push(l[d]),c[e].push(this.loc));return{major:h,minor:c}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loc",{get:function(){var t=this.ranges,e=t[1];switch(this.panel.side){case"left":case"below":return e.start;case"right":case"above":return e.end}},enumerable:!0,configurable:!0}),e}(r.GuideRenderer);i.Axis=p,p.initClass()},function(t,e,i){var n=t(379),r=t(72),o=t(192),s=t(97),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype._render=function(t,e,i){this._draw_group_separators(t,e,i)},e.prototype._draw_group_separators=function(t,e,i){var n=this.model.ranges[0],r=this.model.computed_bounds,o=r[0],s=r[1];if(n.tops&&!(n.tops.length<2)&&this.visuals.separator_line.doit){for(var a=this.model.dimension,l=(a+1)%2,h=[[],[]],c=0,u=0;uo&&f1&&(l.tops[e]=a.tops),l.tops[i]=a.tops.map(function(e){return t.loc}),l},enumerable:!0,configurable:!0}),e}(r.Axis);i.CategoricalAxis=l,l.initClass()},function(t,e,i){var n=t(379),r=t(72),o=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="ContinuousAxis"},e}(r.Axis);i.ContinuousAxis=o,o.initClass()},function(t,e,i){var n=t(379),r=t(77),o=t(98),s=t(195),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e}(r.LinearAxisView);i.DatetimeAxisView=a;var l=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="DatetimeAxis",this.prototype.default_view=a,this.override({ticker:function(){return new s.DatetimeTicker},formatter:function(){return new o.DatetimeTickFormatter}})},e}(r.LinearAxis);i.DatetimeAxis=l,l.initClass()},function(t,e,i){var n=t(72);i.Axis=n.Axis;var r=t(73);i.CategoricalAxis=r.CategoricalAxis;var o=t(74);i.ContinuousAxis=o.ContinuousAxis;var s=t(75);i.DatetimeAxis=s.DatetimeAxis;var a=t(77);i.LinearAxis=a.LinearAxis;var l=t(78);i.LogAxis=l.LogAxis;var h=t(79);i.MercatorAxis=h.MercatorAxis},function(t,e,i){var n=t(379),r=t(72),o=t(74),s=t(96),a=t(191),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e}(r.AxisView);i.LinearAxisView=l;var h=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="LinearAxis",this.prototype.default_view=l,this.override({ticker:function(){return new a.BasicTicker},formatter:function(){return new s.BasicTickFormatter}})},e}(o.ContinuousAxis);i.LinearAxis=h,h.initClass()},function(t,e,i){var n=t(379),r=t(72),o=t(74),s=t(101),a=t(199),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e}(r.AxisView);i.LogAxisView=l;var h=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="LogAxis",this.prototype.default_view=l,this.override({ticker:function(){return new a.LogTicker},formatter:function(){return new s.LogTickFormatter}})},e}(o.ContinuousAxis);i.LogAxis=h,h.initClass()},function(t,e,i){var n=t(379),r=t(72),o=t(77),s=t(102),a=t(200),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e}(r.AxisView);i.MercatorAxisView=l;var h=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="MercatorAxis",this.prototype.default_view=l,this.override({ticker:function(){return new a.MercatorTicker},formatter:function(){return new s.MercatorTickFormatter}})},e}(o.LinearAxis);i.MercatorAxis=h,h.initClass()},function(t,e,i){var n=t(379),r=t(53),o=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="Callback"},e}(r.Model);i.Callback=o,o.initClass()},function(t,e,i){var n=t(379),r=t(80),o=t(15),s=t(32),a=function(e){function i(t){return e.call(this,t)||this}return n.__extends(i,e),i.initClass=function(){this.prototype.type="CustomJS",this.define({args:[o.Any,{}],code:[o.String,""]})},Object.defineProperty(i.prototype,"names",{get:function(){return s.keys(this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"values",{get:function(){return s.values(this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"func",{get:function(){return new(Function.bind.apply(Function,[void 0].concat(this.names,["cb_obj","cb_data","require","exports",this.code])))},enumerable:!0,configurable:!0}),i.prototype.execute=function(e,i){return this.func.apply(e,this.values.concat(e,i,t,{}))},i}(r.Callback);i.CustomJS=a,a.initClass()},function(t,e,i){var n=t(81);i.CustomJS=n.CustomJS;var r=t(83);i.OpenURL=r.OpenURL},function(t,e,i){var n=t(379),r=t(80),o=t(15),s=t(35),a=t(40),l=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="OpenURL",this.define({url:[o.String,"http://"]})},e.prototype.execute=function(t,e){for(var i=0,n=s.get_indices(e.source);i0?a.all(e,l.isBoolean)?(e.length!==t.get_length()&&s.logger.warn("BooleanFilter "+this.id+": length of booleans doesn't match data source"),a.range(0,e.length).filter(function(t){return!0===e[t]})):(s.logger.warn("BooleanFilter "+this.id+": booleans should be array of booleans, defaulting to no filtering"),null):(null!=e&&0==e.length?s.logger.warn("BooleanFilter "+this.id+": booleans is empty, defaulting to no filtering"):s.logger.warn("BooleanFilter "+this.id+": booleans was not set, defaulting to no filtering"),null)},e}(r.Filter);i.BooleanFilter=h,h.initClass()},function(t,e,i){var n=t(379),r=t(92),o=t(15),s=t(32),a=function(e){function i(t){return e.call(this,t)||this}return n.__extends(i,e),i.initClass=function(){this.prototype.type="CustomJSFilter",this.define({args:[o.Any,{}],code:[o.String,""]})},Object.defineProperty(i.prototype,"values",{get:function(){return s.values(this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"func",{get:function(){return new(Function.bind.apply(Function,[void 0].concat(s.keys(this.args),["source","require","exports",this.code])))},enumerable:!0,configurable:!0}),i.prototype.compute_indices=function(i){return this.filter=this.func.apply(this,this.values.concat([i,t,{}])),e.prototype.compute_indices.call(this,i)},i}(r.Filter);i.CustomJSFilter=a,a.initClass()},function(t,e,i){var n=t(379),r=t(53),o=t(15),s=t(44),a=t(21),l=t(14),h=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="Filter",this.define({filter:[o.Array,null]})},e.prototype.compute_indices=function(t){var e=this.filter;return null!=e&&e.length>=0?s.isArrayOf(e,s.isBoolean)?a.range(0,e.length).filter(function(t){return!0===e[t]}):s.isArrayOf(e,s.isInteger)?e:(l.logger.warn("Filter "+this.id+": filter should either be array of only booleans or only integers, defaulting to no filtering"),null):(l.logger.warn("Filter "+this.id+": filter was not set to be an array, defaulting to no filtering"),null)},e}(r.Model);i.Filter=h,h.initClass()},function(t,e,i){var n=t(379),r=t(92),o=t(15),s=t(14),a=t(21),l=function(t){function e(e){var i=t.call(this,e)||this;return i.indices=null,i}return n.__extends(e,t),e.initClass=function(){this.prototype.type="GroupFilter",this.define({column_name:[o.String],group:[o.String]})},e.prototype.compute_indices=function(t){var e=this,i=t.get_column(this.column_name);return null==i?(s.logger.warn("group filter: groupby column not found in data source"),null):(this.indices=a.range(0,t.get_length()||0).filter(function(t){return i[t]===e.group}),0===this.indices.length&&s.logger.warn("group filter: group '"+this.group+"' did not match any values in column '"+this.column_name+"'"),this.indices)},e}(r.Filter);i.GroupFilter=l,l.initClass()},function(t,e,i){var n=t(90);i.BooleanFilter=n.BooleanFilter;var r=t(91);i.CustomJSFilter=r.CustomJSFilter;var o=t(92);i.Filter=o.Filter;var s=t(93);i.GroupFilter=s.GroupFilter;var a=t(95);i.IndexFilter=a.IndexFilter},function(t,e,i){var n=t(379),r=t(92),o=t(15),s=t(14),a=t(44),l=t(21),h=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="IndexFilter",this.define({indices:[o.Array,null]})},e.prototype.compute_indices=function(t){return null!=this.indices&&this.indices.length>=0?l.all(this.indices,a.isInteger)?this.indices:(s.logger.warn("IndexFilter "+this.id+": indices should be array of integers, defaulting to no filtering"),null):(s.logger.warn("IndexFilter "+this.id+": indices was not set, defaulting to no filtering"),null)},e}(r.Filter);i.IndexFilter=h,h.initClass()},function(t,e,i){var n=t(379),r=t(105),o=t(15),s=t(44),a=function(t){function e(e){var i=t.call(this,e)||this;return i.last_precision=3,i}return n.__extends(e,t),e.initClass=function(){this.prototype.type="BasicTickFormatter",this.define({precision:[o.Any,"auto"],use_scientific:[o.Bool,!0],power_limit_high:[o.Number,5],power_limit_low:[o.Number,-3]})},Object.defineProperty(e.prototype,"scientific_limit_low",{get:function(){return Math.pow(10,this.power_limit_low)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scientific_limit_high",{get:function(){return Math.pow(10,this.power_limit_high)},enumerable:!0,configurable:!0}),e.prototype.doFormat=function(t,e){if(0==t.length)return[];var i=0;t.length>=2&&(i=Math.abs(t[1]-t[0])/1e4);var n=!1;if(this.use_scientific)for(var r=0,o=t;ri&&(l>=this.scientific_limit_high||l<=this.scientific_limit_low)){n=!0;break}}var h=new Array(t.length),c=this.precision;if(null==c||s.isNumber(c))if(n)for(var u=0,_=t.length;u<_;u++)h[u]=t[u].toExponential(c||void 0);else for(var u=0,_=t.length;u<_;u++)h[u]=t[u].toFixed(c||void 0).replace(/(\.[0-9]*?)0+$/,"$1").replace(/\.$/,"");else for(var p=this.last_precision,d=this.last_precision<=15;d?p<=15:p>=15;d?p++:p--){var f=!0;if(n){for(var u=0,_=t.length;u<_;u++)if(h[u]=t[u].toExponential(p),u>0&&h[u]===h[u-1]){f=!1;break}if(f)break}else{for(var u=0,_=t.length;u<_;u++)if(h[u]=t[u].toFixed(p).replace(/(\.[0-9]*?)0+$/,"$1").replace(/\.$/,""),u>0&&h[u]==h[u-1]){f=!1;break}if(f)break}if(f){this.last_precision=p;break}}return h},e}(r.TickFormatter);i.BasicTickFormatter=a,a.initClass()},function(t,e,i){var n=t(379),r=t(105),o=t(21),s=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="CategoricalTickFormatter"},e.prototype.doFormat=function(t,e){return o.copy(t)},e}(r.TickFormatter);i.CategoricalTickFormatter=s,s.initClass()},function(t,e,i){function n(t){return a(t,"%Y %m %d %H %M %S").split(/\s+/).map(function(t){return parseInt(t,10)})}function r(t,e){if(_.isFunction(e))return e(t);var i=s.sprintf("$1%06d",function(t){return Math.round(t/1e3%1*1e6)}(t));return-1==(e=e.replace(/((^|[^%])(%%)*)%f/,i)).indexOf("%")?e:a(t,e)}var o=t(379),s=t(377),a=t(378),l=t(105),h=t(14),c=t(15),u=t(21),_=t(44),p=["microseconds","milliseconds","seconds","minsec","minutes","hourmin","hours","days","months","years"],d=function(t){function e(e){var i=t.call(this,e)||this;return i.strip_leading_zeros=!0,i}return o.__extends(e,t),e.initClass=function(){this.prototype.type="DatetimeTickFormatter",this.define({microseconds:[c.Array,["%fus"]],milliseconds:[c.Array,["%3Nms","%S.%3Ns"]],seconds:[c.Array,["%Ss"]],minsec:[c.Array,[":%M:%S"]],minutes:[c.Array,[":%M","%Mm"]],hourmin:[c.Array,["%H:%M"]],hours:[c.Array,["%Hh","%H:%M"]],days:[c.Array,["%m/%d","%a%d"]],months:[c.Array,["%m/%Y","%b%y"]],years:[c.Array,["%Y"]]})},e.prototype.initialize=function(){t.prototype.initialize.call(this),this._update_width_formats()},e.prototype._update_width_formats=function(){var t=+a(new Date),e=function(e){var i=e.map(function(e){return r(t,e).length}),n=u.sortBy(u.zip(i,e),function(t){var e=t[0];return e});return u.unzip(n)};this._width_formats={microseconds:e(this.microseconds),milliseconds:e(this.milliseconds),seconds:e(this.seconds),minsec:e(this.minsec),minutes:e(this.minutes),hourmin:e(this.hourmin),hours:e(this.hours),days:e(this.days),months:e(this.months),years:e(this.years)}},e.prototype._get_resolution_str=function(t,e){var i=1.1*t;switch(!1){case!(i<.001):return"microseconds";case!(i<1):return"milliseconds";case!(i<60):return e>=60?"minsec":"seconds";case!(i<3600):return e>=3600?"hourmin":"minutes";case!(i<86400):return"hours";case!(i<2678400):return"days";case!(i<31536e3):return"months";default:return"years"}},e.prototype.doFormat=function(t,e){if(0==t.length)return[];for(var i=Math.abs(t[t.length-1]-t[0])/1e3,o=i/(t.length-1),s=this._get_resolution_str(o,i),a=this._width_formats[s],l=a[1],c=l[0],u=[],_=p.indexOf(s),d={},f=0,v=p;f0&&r[o]==r[o-1]){n=!0;break}return n?this.basic_formatter.doFormat(t,e):r},e}(r.TickFormatter);i.LogTickFormatter=l,l.initClass()},function(t,e,i){var n=t(379),r=t(96),o=t(15),s=t(33),a=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="MercatorTickFormatter",this.define({dimension:[o.LatLon]})},e.prototype.doFormat=function(e,i){if(null==this.dimension)throw new Error("MercatorTickFormatter.dimension not configured");if(0==e.length)return[];var n=e.length,r=new Array(n);if("lon"==this.dimension)for(var o=0;o=x&&f.push([y,S])}for(var C=this.model.properties.direction.value(),T=[],A=0,E=f;A=v&&c.push([d,k])}return o.create_hit_test_result_from_hits(c)},e.prototype.draw_legend_for_index=function(t,e,i){var n=e.x0,r=e.y0,o=e.x1,s=e.y1,a=i+1,l=new Array(a);l[i]=(n+o)/2;var h=new Array(a);h[i]=(r+s)/2;var c=.5*Math.min(Math.abs(o-n),Math.abs(s-r)),u=new Array(a);u[i]=.4*c;var _=new Array(a);_[i]=.8*c,this._render(t,[i],{sx:l,sy:h,sinner_radius:u,souter_radius:_})},e}(r.XYGlyphView);i.AnnulusView=l;var h=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="Annulus",this.prototype.default_view=l,this.mixins(["line","fill"]),this.define({inner_radius:[s.DistanceSpec],outer_radius:[s.DistanceSpec]})},e}(r.XYGlyph);i.Annulus=h,h.initClass()},function(t,e,i){var n=t(379),r=t(135),o=t(132),s=t(15),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype._map_data=function(){"data"==this.model.properties.radius.units?this.sradius=this.sdist(this.renderer.xscale,this._x,this._radius):this.sradius=this._radius},e.prototype._render=function(t,e,i){var n=i.sx,r=i.sy,o=i.sradius,s=i._start_angle,a=i._end_angle;if(this.visuals.line.doit)for(var l=this.model.properties.direction.value(),h=0,c=e;h1?(_[i]=u,p[i]=u/c):(_[i]=u*c,p[i]=u),this._render(t,[i],{sx:l,sy:h,sw:_,sh:p})},e.prototype._bounds=function(t){var e=t.minX,i=t.maxX,n=t.minY,r=t.maxY;return{minX:e-this.max_w2,maxX:i+this.max_w2,minY:n-this.max_h2,maxY:r+this.max_h2}},e}(r.XYGlyphView);i.EllipseView=s;var a=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="Ellipse",this.prototype.default_view=s,this.mixins(["line","fill"]),this.define({angle:[o.AngleSpec,0],width:[o.DistanceSpec],height:[o.DistanceSpec]})},e}(r.XYGlyph);i.Ellipse=a,a.initClass()},function(t,e,i){var n=t(379),r=t(9),o=t(15),s=t(24),a=t(33),l=t(49),h=t(48),c=t(53),u=t(14),_=t(22),p=t(32),d=t(44),f=t(120),v=t(165),m=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t._nohit_warned={},t}return n.__extends(i,e),i.prototype.initialize=function(i){e.prototype.initialize.call(this,i),this._nohit_warned={},this.renderer=i.renderer,this.visuals=new l.Visuals(this.model);var n=this.renderer.plot_view.gl;if(null!=n){var r=null;try{r=t(440)}catch(t){if("MODULE_NOT_FOUND"!==t.code)throw t;u.logger.warn("WebGL was requested and is supported, but bokeh-gl(.min).js is not available, falling back to 2D rendering.")}if(null!=r){var o=r[this.model.type+"GLGlyph"];null!=o&&(this.glglyph=new o(n.ctx,this))}}},i.prototype.set_visuals=function(t){this.visuals.warm_cache(t),null!=this.glglyph&&this.glglyph.set_visuals_changed()},i.prototype.render=function(t,e,i){t.beginPath(),null!=this.glglyph&&this.glglyph.render(t,e,i)||this._render(t,e,i)},i.prototype.has_finished=function(){return!0},i.prototype.notify_finished=function(){this.renderer.notify_finished()},i.prototype._bounds=function(t){return t},i.prototype.bounds=function(){return this._bounds(this.index.bbox)},i.prototype.log_bounds=function(){for(var t=s.empty(),e=this.index.search(s.positive_x()),i=0,n=e;it.maxX&&(t.maxX=r.maxX)}for(var o=this.index.search(s.positive_y()),a=0,l=o;at.maxY&&(t.maxY=h.maxY)}return this._bounds(t)},i.prototype.get_anchor_point=function(t,e,i){var n=i[0],r=i[1];switch(t){case"center":return{x:this.scenterx(e,n,r),y:this.scentery(e,n,r)};default:return null}},i.prototype.sdist=function(t,e,i,n,r){void 0===n&&(n="edge"),void 0===r&&(r=!1);var o,s,a=e.length;if("center"==n){var l=_.map(i,function(t){return t/2});o=new Float64Array(a);for(var h=0;h0){n=this._image[e];var r=this._image_shape[e];this._height[e]=r[0],this._width[e]=r[1]}else{var o=this._image[e];n=a.concat(o),this._height[e]=o.length,this._width[e]=o[0].length}var s=this.image_data[e],l=void 0;null!=s&&s.width==this._width[e]&&s.height==this._height[e]?l=s:((l=document.createElement("canvas")).width=this._width[e],l.height=this._height[e]);var h=l.getContext("2d"),c=h.getImageData(0,0,this._width[e],this._height[e]),u=t.v_compute(n);c.data.set(u),h.putImageData(c,0,0),this.image_data[e]=l,this.max_dw=0,"data"==this.model.properties.dw.units&&(this.max_dw=a.max(this._dw)),this.max_dh=0,"data"==this.model.properties.dh.units&&(this.max_dh=a.max(this._dh))}},e.prototype._map_data=function(){switch(this.model.properties.dw.units){case"data":this.sw=this.sdist(this.renderer.xscale,this._x,this._dw,"edge",this.model.dilate);break;case"screen":this.sw=this._dw}switch(this.model.properties.dh.units){case"data":this.sh=this.sdist(this.renderer.yscale,this._y,this._dh,"edge",this.model.dilate);break;case"screen":this.sh=this._dh}},e.prototype._render=function(t,e,i){var n=i.image_data,r=i.sx,o=i.sy,s=i.sw,a=i.sh,l=t.getImageSmoothingEnabled();t.setImageSmoothingEnabled(!1),t.globalAlpha=this.model.global_alpha;for(var h=0,c=e;h0){n=this._image[e].buffer;var r=this._image_shape[e];this._height[e]=r[0],this._width[e]=r[1]}else{var o=this._image[e],a=s.concat(o);n=new ArrayBuffer(4*a.length);for(var l=new Uint32Array(n),h=0,c=a.length;h0?(o.logger.trace("ImageURL failed to load "+t._url[e]+" image, retrying in "+r+" ms"),setTimeout(function(){return a.src=t._url[e]},r)):o.logger.warn("ImageURL unable to load "+t._url[e]+" image after "+n+" retries"),t.retries[e]-=1},a.onload=function(){t.image[e]=a,t.renderer.request_render()},a.src=l._url[e]},l=this,h=0,c=this._url.length;h1&&(t.stroke(),o=!1)}o?t.lineTo(n[h],r[h]):(t.beginPath(),t.moveTo(n[h],r[h]),o=!0),s=h}o&&t.stroke()},e.prototype._hit_point=function(t){for(var e=this,i=s.create_empty_hit_test_result(),n={x:t.sx,y:t.sy},r=9999,o=Math.max(2,this.visuals.line.line_width.value()/2),a=0,l=this.sx.length-1;a0&&(l[h]=u)}return a.indices=s.keys(l).map(function(t){return parseInt(t,10)}),a.multiline_indices=l,a},e.prototype.get_interpolation_hit=function(t,e,i){var n,r,s,a,l=i.sx,h=i.sy,c=this._xs[t][e],u=this._ys[t][e],_=this._xs[t][e+1],p=this._ys[t][e+1];"point"==i.type?(m=this.renderer.yscale.r_invert(h-1,h+1),s=m[0],a=m[1],g=this.renderer.xscale.r_invert(l-1,l+1),n=g[0],r=g[1]):"v"==i.direction?(y=this.renderer.yscale.r_invert(h,h),s=y[0],a=y[1],n=(b=[c,_])[0],r=b[1]):(x=this.renderer.xscale.r_invert(l,l),n=x[0],r=x[1],s=(w=[u,p])[0],a=w[1]);var d=o.check_2_segments_intersect(n,s,r,a,c,u,_,p),f=d.x,v=d.y;return[f,v];var m,g,y,b,x,w},e.prototype.draw_legend_for_index=function(t,e,i){c.generic_line_legend(this.visuals,t,e,i)},e.prototype.scenterx=function(){throw new Error("not implemented")},e.prototype.scentery=function(){throw new Error("not implemented")},e}(h.GlyphView);i.MultiLineView=u;var _=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="MultiLine",this.prototype.default_view=u,this.coords([["xs","ys"]]),this.mixins(["line"])},e}(h.Glyph);i.MultiLine=_,_.initClass()},function(t,e,i){var n=t(379),r=t(135),o=t(15),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype._set_data=function(){this.max_w2=0,"data"==this.model.properties.width.units&&(this.max_w2=this.max_width/2),this.max_h2=0,"data"==this.model.properties.height.units&&(this.max_h2=this.max_height/2)},e.prototype._map_data=function(){"data"==this.model.properties.width.units?this.sw=this.sdist(this.renderer.xscale,this._x,this._width,"center"):this.sw=this._width,"data"==this.model.properties.height.units?this.sh=this.sdist(this.renderer.yscale,this._y,this._height,"center"):this.sh=this._height},e.prototype._render=function(t,e,i){for(var n=i.sx,r=i.sy,o=i.sw,s=i.sh,a=i._angle,l=0,h=e;l1?(_[i]=u,p[i]=u/c):(_[i]=u*c,p[i]=u),this._render(t,[i],{sx:l,sy:h,sw:_,sh:p})},e.prototype._bounds=function(t){var e=t.minX,i=t.maxX,n=t.minY,r=t.maxY;return{minX:e-this.max_w2,maxX:i+this.max_w2,minY:n-this.max_h2,maxY:r+this.max_h2}},e}(r.XYGlyphView);i.OvalView=s;var a=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="Oval",this.prototype.default_view=s,this.mixins(["line","fill"]),this.define({angle:[o.AngleSpec,0],width:[o.DistanceSpec],height:[o.DistanceSpec]})},e}(r.XYGlyph);i.Oval=a,a.initClass()},function(t,e,i){var n=t(379),r=t(135),o=t(132),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype._render=function(t,e,i){var n=i.sx,r=i.sy;if(this.visuals.fill.doit){this.visuals.fill.set_value(t);for(var o=0,s=e;o0;){var o=a.findLastIndex(r,function(t){return h.isStrictNaN(t)}),s=void 0;o>=0?s=r.splice(o):(s=r,r=[]);var l=s.filter(function(t){return!h.isStrictNaN(t)});e[i].push(l)}}return e},e.prototype._index_data=function(){for(var t=this._build_discontinuous_object(this._xs),e=this._build_discontinuous_object(this._ys),i=[],n=0,o=this._xs.length;n=0,x=i-this.sy1[a]<=this.sh[a]&&i-this.sy1[a]>=0;x&&w&&m.push(a)}var A=s.create_empty_hit_test_result();return A.indices=m,A},e.prototype._map_dist_corner_for_data_side_length=function(t,e,i){for(var n=t.length,r=new Float64Array(n),o=new Float64Array(n),s=0;so[1]&&(e=o[1]);else{t=o[0],e=o[1];for(var s=0,l=this.plot.select(r.Axis);s1?y[1]:"",w=this._horizontal?"row":"col";g=b+" "+w+"-"+o+"-"+a+"-"+x}else g=v;s[g]=g in s?s[g].concat(m):m}a++}return s},e.prototype._align_inner_cell_edges_constraints=function(){var t=[];if(null!=this.document&&s.includes(this.document.roots(),this)){var e=this._flatten_cell_edge_variables(this._horizontal);for(var i in e){var n=e[i];if(n.length>1)for(var o=n[0],a=1;a0)if(this._horizontal==t){var r=i[0],o=i[i.length-1];r instanceof e?n[0]=n[0].concat(r._find_edge_leaves(t)[0]):n[0].push(r),o instanceof e?n[1]=n[1].concat(o._find_edge_leaves(t)[1]):n[1].push(o)}else for(var s=0,a=i;s1)for(var e=t[0],i=1;i0?this.model._width.value-20+"px":"100%",this.el.style.width=i}},e.prototype.get_height=function(){var t=0;for(var e in this.child_views){var i=this.child_views[e],n=i.el,r=getComputedStyle(n),o=parseInt(r.marginTop)||0,s=parseInt(r.marginBottom)||0;t+=n.offsetHeight+o+s}return t+20},e.prototype.get_width=function(){if(null!=this.model.width)return this.model.width;var t=this.el.scrollWidth+20;for(var e in this.child_views){var i=this.child_views[e],n=i.el.scrollWidth;n>t&&(t=n)}return t},e}(a.LayoutDOMView);i.WidgetBoxView=l;var h=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="WidgetBox",this.prototype.default_view=l,this.define({children:[o.Array,[]]})},e.prototype.initialize=function(){t.prototype.initialize.call(this),"fixed"==this.sizing_mode&&null==this.width&&(this.width=300,r.logger.info("WidgetBox mode is fixed, but no width specified. Using default of 300."))},e.prototype.get_constrained_variables=function(){var e=s.extend({},t.prototype.get_constrained_variables.call(this),{on_edge_align_top:this._top,on_edge_align_bottom:this._height_minus_bottom,on_edge_align_left:this._left,on_edge_align_right:this._width_minus_right,box_cell_align_top:this._top,box_cell_align_bottom:this._height_minus_bottom,box_cell_align_left:this._left,box_cell_align_right:this._width_minus_right,box_equal_size_top:this._top,box_equal_size_bottom:this._height_minus_bottom});return"fixed"!=this.sizing_mode&&(e.box_equal_size_left=this._left,e.box_equal_size_right=this._width_minus_right),e},e.prototype.get_layoutable_children=function(){return this.children},e}(a.LayoutDOM);i.WidgetBox=h,h.initClass()},function(t,e,i){var n=t(379),r=t(151),o=t(15),s=t(21),a=t(44),l=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="CategoricalColorMapper",this.define({factors:[o.Array],start:[o.Number,0],end:[o.Number]})},e.prototype._v_compute=function(t,e,i,n){for(var r=n.nan_color,o=function(n,o){var h=t[n],c=void 0;a.isString(h)?c=l.factors.indexOf(h):(null!=l.start?h=null!=l.end?h.slice(l.start,l.end):h.slice(l.start):null!=l.end&&(h=h.slice(0,l.end)),c=1==h.length?l.factors.indexOf(h[0]):s.findIndex(l.factors,function(t){return function(t,e){if(t.length!=e.length)return!1;for(var i=0,n=t.length;i=i.length?r:i[c],e[n]=u},l=this,h=0,c=t.length;hc?null!=a?a:i[c]:i[m]}else e[p]=i[c]}},e}(r.ContinuousColorMapper);i.LinearColorMapper=s,s.initClass()},function(t,e,i){var n=t(379),r=t(152),o=t(22),s=null!=Math.log1p?Math.log1p:function(t){return Math.log(1+t)},a=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="LogColorMapper"},e.prototype._v_compute=function(t,e,i,n){for(var r=n.nan_color,a=n.low_color,l=n.high_color,h=i.length,c=null!=this.low?this.low:o.min(t),u=null!=this.high?this.high:o.max(t),_=h/(s(u)-s(c)),p=i.length-1,d=0,f=t.length;du)e[d]=null!=l?l:i[p];else if(v!=u)if(vp&&(g=p),e[d]=i[g]}else e[d]=i[p]}},e}(r.ContinuousColorMapper);i.LogColorMapper=a,a.initClass()},function(t,e,i){function n(t,e){t.moveTo(-e,e),t.lineTo(e,-e),t.moveTo(-e,-e),t.lineTo(e,e)}function r(t,e){t.moveTo(0,e),t.lineTo(0,-e),t.moveTo(-e,0),t.lineTo(e,0)}function o(t,e){t.moveTo(0,e),t.lineTo(e/1.5,0),t.lineTo(0,-e),t.lineTo(-e/1.5,0),t.closePath()}function s(t,e){var i=e*c,n=i/3;t.moveTo(-e,n),t.lineTo(e,n),t.lineTo(0,n-i),t.closePath()}function a(t,e){var i=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return l.__extends(i,t),i.initClass=function(){this.prototype._render_one=e},i}(h.MarkerView);i.initClass();var n=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return l.__extends(n,e),n.initClass=function(){this.prototype.default_view=i,this.prototype.type=t},n}(h.Marker);return n.initClass(),n}var l=t(379),h=t(157),c=Math.sqrt(3);i.Asterisk=a("Asterisk",function(t,e,i,o,s){var a=.65*i;r(t,i),n(t,a),o.doit&&(o.set_vectorize(t,e),t.stroke())}),i.CircleCross=a("CircleCross",function(t,e,i,n,o){t.arc(0,0,i,0,2*Math.PI,!1),o.doit&&(o.set_vectorize(t,e),t.fill());n.doit&&(n.set_vectorize(t,e),r(t,i),t.stroke())}),i.CircleX=a("CircleX",function(t,e,i,r,o){t.arc(0,0,i,0,2*Math.PI,!1),o.doit&&(o.set_vectorize(t,e),t.fill());r.doit&&(r.set_vectorize(t,e),n(t,i),t.stroke())}),i.Cross=a("Cross",function(t,e,i,n,o){r(t,i),n.doit&&(n.set_vectorize(t,e),t.stroke())}),i.Diamond=a("Diamond",function(t,e,i,n,r){o(t,i),r.doit&&(r.set_vectorize(t,e),t.fill());n.doit&&(n.set_vectorize(t,e),t.stroke())}),i.DiamondCross=a("DiamondCross",function(t,e,i,n,s){o(t,i),s.doit&&(s.set_vectorize(t,e),t.fill());n.doit&&(n.set_vectorize(t,e),r(t,i),t.stroke())}),i.Hex=a("Hex",function(t,e,i,n,r){(function(t,e){var i=e/2,n=c*i;t.moveTo(e,0),t.lineTo(i,-n),t.lineTo(-i,-n),t.lineTo(-e,0),t.lineTo(-i,n),t.lineTo(i,n),t.closePath()})(t,i),r.doit&&(r.set_vectorize(t,e),t.fill());n.doit&&(n.set_vectorize(t,e),t.stroke())}),i.InvertedTriangle=a("InvertedTriangle",function(t,e,i,n,r){t.rotate(Math.PI),s(t,i),t.rotate(-Math.PI),r.doit&&(r.set_vectorize(t,e),t.fill());n.doit&&(n.set_vectorize(t,e),t.stroke())}),i.Square=a("Square",function(t,e,i,n,r){var o=2*i;t.rect(-i,-i,o,o),r.doit&&(r.set_vectorize(t,e),t.fill());n.doit&&(n.set_vectorize(t,e),t.stroke())}),i.SquareCross=a("SquareCross",function(t,e,i,n,o){var s=2*i;t.rect(-i,-i,s,s),o.doit&&(o.set_vectorize(t,e),t.fill());n.doit&&(n.set_vectorize(t,e),r(t,i),t.stroke())}),i.SquareX=a("SquareX",function(t,e,i,r,o){var s=2*i;t.rect(-i,-i,s,s),o.doit&&(o.set_vectorize(t,e),t.fill());r.doit&&(r.set_vectorize(t,e),n(t,i),t.stroke())}),i.Triangle=a("Triangle",function(t,e,i,n,r){s(t,i),r.doit&&(r.set_vectorize(t,e),t.fill());n.doit&&(n.set_vectorize(t,e),t.stroke())}),i.X=a("X",function(t,e,i,r,o){n(t,i),r.doit&&(r.set_vectorize(t,e),t.stroke())})},function(t,e,i){var n=t(379),r=t(135),o=t(9),s=t(15),a=t(21),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype._render=function(t,e,i){for(var n=i.sx,r=i.sy,o=i._size,s=i._angle,a=0,l=e;a=2){this.map.setZoom(r);var o=this._get_projected_bounds(),s=o[0],a=o[1];a-s<0&&this.map.setZoom(n)}this.unpause()}this._set_bokeh_ranges()},e.prototype._build_map=function(){var t=this,e=google.maps;this.map_types={satellite:e.MapTypeId.SATELLITE,terrain:e.MapTypeId.TERRAIN,roadmap:e.MapTypeId.ROADMAP,hybrid:e.MapTypeId.HYBRID};var i=this.model.plot.map_options,n={center:new e.LatLng(i.lat,i.lng),zoom:i.zoom,disableDefaultUI:!0,mapTypeId:this.map_types[i.map_type],scaleControl:i.scale_control};null!=i.styles&&(n.styles=JSON.parse(i.styles)),this.map=new e.Map(this.canvas_view.map_el,n),e.event.addListener(this.map,"idle",function(){return t._set_bokeh_ranges()}),e.event.addListener(this.map,"bounds_changed",function(){return t._set_bokeh_ranges()}),e.event.addListenerOnce(this.map,"tilesloaded",function(){return t._render_finished()}),this.connect(this.model.plot.properties.map_options.change,function(){return t._update_options()}),this.connect(this.model.plot.map_options.properties.styles.change,function(){return t._update_styles()}),this.connect(this.model.plot.map_options.properties.lat.change,function(){return t._update_center("lat")}),this.connect(this.model.plot.map_options.properties.lng.change,function(){return t._update_center("lng")}),this.connect(this.model.plot.map_options.properties.zoom.change,function(){return t._update_zoom()}),this.connect(this.model.plot.map_options.properties.map_type.change,function(){return t._update_map_type()}),this.connect(this.model.plot.map_options.properties.scale_control.change,function(){return t._update_scale_control()})},e.prototype._render_finished=function(){this._tiles_loaded=!0,this.notify_finished()},e.prototype.has_finished=function(){return t.prototype.has_finished.call(this)&&!0===this._tiles_loaded},e.prototype._get_latlon_bounds=function(){var t=this.map.getBounds(),e=t.getNorthEast(),i=t.getSouthWest(),n=i.lng(),r=e.lng(),o=i.lat(),s=e.lat();return[n,r,o,s]},e.prototype._get_projected_bounds=function(){var t=this._get_latlon_bounds(),e=t[0],i=t[1],n=t[2],r=t[3],s=o.wgs84_mercator.forward([e,n]),a=s[0],l=s[1],h=o.wgs84_mercator.forward([i,r]),c=h[0],u=h[1];return[a,c,l,u]},e.prototype._set_bokeh_ranges=function(){var t=this._get_projected_bounds(),e=t[0],i=t[1],n=t[2],r=t[3];this.frame.x_range.setv({start:e,end:i}),this.frame.y_range.setv({start:n,end:r})},e.prototype._update_center=function(t){var e=this.map.getCenter().toJSON();e[t]=this.model.plot.map_options[t],this.map.setCenter(e),this._set_bokeh_ranges()},e.prototype._update_map_type=function(){this.map.setOptions({mapTypeId:this.map_types[this.model.plot.map_options.map_type]})},e.prototype._update_scale_control=function(){this.map.setOptions({scaleControl:this.model.plot.map_options.scale_control})},e.prototype._update_options=function(){this._update_styles(),this._update_center("lat"),this._update_center("lng"),this._update_zoom(),this._update_map_type()},e.prototype._update_styles=function(){this.map.setOptions({styles:JSON.parse(this.model.plot.map_options.styles)})},e.prototype._update_zoom=function(){this.map.setOptions({zoom:this.model.plot.map_options.zoom}),this._set_bokeh_ranges()},e.prototype._map_hook=function(t,e){var i=e[0],n=e[1],r=e[2],o=e[3];this.canvas_view.map_el.style.top=n+"px",this.canvas_view.map_el.style.left=i+"px",this.canvas_view.map_el.style.width=r+"px",this.canvas_view.map_el.style.height=o+"px",null==this.map&&"undefined"!=typeof google&&null!=google.maps&&this._build_map()},e.prototype._paint_empty=function(t,e){var i=this.canvas._width.value,n=this.canvas._height.value,r=e[0],o=e[1],s=e[2],a=e[3];t.clearRect(0,0,i,n),t.beginPath(),t.moveTo(0,0),t.lineTo(0,n),t.lineTo(i,n),t.lineTo(i,0),t.lineTo(0,0),t.moveTo(r,o),t.lineTo(r+s,o),t.lineTo(r+s,o+a),t.lineTo(r,o+a),t.lineTo(r,o),t.closePath(),t.fillStyle=this.model.plot.border_fill_color,t.fill()},e}(s.PlotCanvasView);i.GMapPlotCanvasView=l;var h=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="GMapPlotCanvas",this.prototype.default_view=l},e.prototype.initialize=function(){this.use_map=!0,t.prototype.initialize.call(this)},e}(s.PlotCanvas);i.GMapPlotCanvas=h,h.initClass()},function(t,e,i){var n=t(158);i.MapOptions=n.MapOptions;var r=t(158);i.GMapOptions=r.GMapOptions;var o=t(158);i.GMapPlot=o.GMapPlot;var s=t(159);i.GMapPlotCanvas=s.GMapPlotCanvas;var a=t(161);i.Plot=a.Plot;var l=t(162);i.PlotCanvas=l.PlotCanvas},function(t,e,i){var n=t(379),r=t(13),o=t(14),s=t(15),a=t(21),l=t(32),h=t(44),c=t(146),u=t(68),_=t(176),p=t(247),d=t(69),f=t(162),v=t(184),m=t(169),g=t(3),y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.connect_signals=function(){t.prototype.connect_signals.call(this);this.connect(this.model.properties.title.change,function(){return o.logger.warn("Title object cannot be replaced. Try changing properties on title to update it after initialization.")})},e.prototype.css_classes=function(){return t.prototype.css_classes.call(this).concat("bk-plot-layout")},e.prototype.get_height=function(){return this.model._width.value/this.model.get_aspect_ratio()},e.prototype.get_width=function(){return this.model._height.value*this.model.get_aspect_ratio()},e.prototype.save=function(t){this.plot_canvas_view.save(t)},Object.defineProperty(e.prototype,"plot_canvas_view",{get:function(){return this.child_views[this.model.plot_canvas.id]},enumerable:!0,configurable:!0}),e}(c.LayoutDOMView);i.PlotView=y;var b=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="Plot",this.prototype.default_view=y,this.mixins(["line:outline_","fill:background_","fill:border_"]),this.define({toolbar:[s.Instance,function(){return new p.Toolbar}],toolbar_location:[s.Location,"right"],toolbar_sticky:[s.Boolean,!0],plot_width:[s.Number,600],plot_height:[s.Number,600],title:[s.Any,function(){return new u.Title({text:""})}],title_location:[s.Location,"above"],h_symmetry:[s.Bool,!0],v_symmetry:[s.Bool,!1],above:[s.Array,[]],below:[s.Array,[]],left:[s.Array,[]],right:[s.Array,[]],renderers:[s.Array,[]],x_range:[s.Instance],extra_x_ranges:[s.Any,{}],y_range:[s.Instance],extra_y_ranges:[s.Any,{}],x_scale:[s.Instance,function(){return new _.LinearScale}],y_scale:[s.Instance,function(){return new _.LinearScale}],lod_factor:[s.Number,10],lod_interval:[s.Number,300],lod_threshold:[s.Number,2e3],lod_timeout:[s.Number,500],hidpi:[s.Bool,!0],output_backend:[s.OutputBackend,"canvas"],min_border:[s.Number,5],min_border_top:[s.Number,null],min_border_left:[s.Number,null],min_border_bottom:[s.Number,null],min_border_right:[s.Number,null],inner_width:[s.Number],inner_height:[s.Number],layout_width:[s.Number],layout_height:[s.Number],match_aspect:[s.Bool,!1],aspect_scale:[s.Number,1]}),this.override({outline_line_color:"#e5e5e5",border_fill_color:"#ffffff",background_fill_color:"#ffffff"}),g.register_with_event(g.UIEvent,this)},e.prototype.initialize=function(){t.prototype.initialize.call(this);for(var e=0,i=l.values(this.extra_x_ranges).concat(this.x_range);el.end;if(!i){var u=this._get_weight_to_constrain_interval(l,h);u<1&&(h.start=u*h.start+(1-u)*l.start,h.end=u*h.end+(1-u)*l.end)}if(null!=l.bounds&&"auto"!=l.bounds){var _=l.bounds,p=_[0],d=_[1],f=Math.abs(h.end-h.start);c?(null!=p&&p>=h.end&&(r=!0,h.end=p,(e||i)&&(h.start=p+f)),null!=d&&d<=h.start&&(r=!0,h.start=d,(e||i)&&(h.end=d-f))):(null!=p&&p>=h.start&&(r=!0,h.start=p,(e||i)&&(h.end=p+f)),null!=d&&d<=h.end&&(r=!0,h.end=d,(e||i)&&(h.start=d-f)))}}if(!(i&&r&&n))for(var v=0,m=t;v0&&c0&&c>n&&(l=(n-h)/(c-h)),l=Math.max(0,Math.min(1,l))}return l},e.prototype.update_range=function(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===n&&(n=!0),this.pause();var r=this.frame,o=r.x_ranges,s=r.y_ranges;if(null==t){for(var a in o){var l=o[a];l.reset()}for(var h in s){var l=s[h];l.reset()}this.update_dataranges()}else{var c=[];for(var u in o){var l=o[u];c.push([l,t.xrs[u]])}for(var _ in s){var l=s[_];c.push([l,t.yrs[_]])}i&&this._update_ranges_together(c),this._update_ranges_individually(c,e,i,n)}this.unpause()},e.prototype.reset_range=function(){this.update_range(null)},e.prototype.build_levels=function(){for(var t=this.model.plot.all_renderers,e=k.keys(this.renderer_views),i=c.build_views(this.renderer_views,t,this.view_options()),n=w.difference(e,t.map(function(t){return t.id})),r=0,o=n;r=0&&in.lod_timeout&&e.interactive_stop(n),t.request_render()},n.lod_timeout):e.interactive_stop(n)}for(var r in this.renderer_views){var o=this.renderer_views[r];if(null==this.range_update_timestamp||o instanceof a.GlyphRendererView&&o.set_data_timestamp>this.range_update_timestamp){this.update_dataranges();break}}this.model.frame.update_scales();var s=this.canvas_view.ctx,l=this.canvas.pixel_ratio;s.save(),s.scale(l,l),s.translate(.5,.5);var h=[this.frame._left.value,this.frame._top.value,this.frame._width.value,this.frame._height.value];if(this._map_hook(s,h),this._paint_empty(s,h),this.prepare_webgl(l,h),s.save(),this.visuals.outline_line.doit){this.visuals.outline_line.set_value(s);var c=h[0],u=h[1],_=h[2],p=h[3];c+_==this.canvas._width.value&&(_-=1),u+p==this.canvas._height.value&&(p-=1),s.strokeRect(c,u,_,p)}s.restore(),this._paint_levels(s,["image","underlay","glyph"],h),this.blit_webgl(l),this._paint_levels(s,["annotation"],h),this._paint_levels(s,["overlay"]),null==this._initial_state_info.range&&this.set_initial_range(),s.restore(),this._has_finished||(this._has_finished=!0,this.notify_finished())}},e.prototype._paint_levels=function(t,e,i){t.save(),null!=i&&(t.beginPath(),t.rect.apply(t,i),t.clip());for(var n={},r=0;r0&&(e=e.filter(function(e){return h.includes(t,e.name)})),s.logger.debug("computed "+e.length+" renderers for DataRange1d "+this.id);for(var l=0,c=e;lu&&("start"==this.follow?n=i+c*u:"end"==this.follow&&(i=n-c*u)),[i,n];var _},e.prototype.update=function(t,e,i,n){if(!this.have_updated_interactively){var r=this.computed_renderers(),o=this._compute_plot_bounds(r,t);null!=n&&(o=this.adjust_bounds_for_aspect(o,n)),this._plot_bounds[i]=o;var s=this._compute_min_max(this._plot_bounds,e),a=s[0],l=s[1],h=this._compute_range(a,l),c=h[0],u=h[1];null!=this._initial_start&&("log"==this.scale_hint?this._initial_start>0&&(c=this._initial_start):c=this._initial_start),null!=this._initial_end&&("log"==this.scale_hint?this._initial_end>0&&(u=this._initial_end):u=this._initial_end);var _=[this.start,this.end],p=_[0],d=_[1];if(c!=p||u!=d){var f={};c!=p&&(f.start=c),u!=d&&(f.end=u),this.setv(f)}"auto"==this.bounds&&this.setv({bounds:[c,u]},{silent:!0}),this.change.emit()}},e.prototype.reset=function(){this.have_updated_interactively=!1,this.setv({range_padding:this._initial_range_padding,range_padding_units:this._initial_range_padding_units,follow:this._initial_follow,follow_interval:this._initial_follow_interval,default_span:this._initial_default_span},{silent:!0}),this.change.emit()},e}(r.DataRange);i.DataRange1d=c,c.initClass()},function(t,e,i){function n(t,e,i){void 0===i&&(i=0);for(var n={},r=0;rthis.end},enumerable:!0,configurable:!0}),e.prototype.reset=function(){this._set_auto_bounds(),this.start!=this._initial_start||this.end!=this._initial_end?this.setv({start:this._initial_start,end:this._initial_end}):this.change.emit()},e}(r.Range);i.Range1d=s,s.initClass()},function(t,e,i){var n=t(379),r=t(173),o=t(120),s=t(189),a=t(183),l=t(14),h=t(15),c=t(22),u=t(21),_=t(32),p=t(165),d={fill:{},line:{}},f={fill:{fill_alpha:.3,fill_color:"grey"},line:{line_alpha:.3,line_color:"grey"}},v={fill:{fill_alpha:.2},line:{}},m=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.initialize=function(e){function i(t){var e=_.clone(a);return r&&_.extend(e,t.fill),o&&_.extend(e,t.line),new n.constructor(e)}t.prototype.initialize.call(this,e);var n=this.model.glyph,r=u.includes(n.mixins,"fill"),o=u.includes(n.mixins,"line"),a=_.clone(n.attributes);delete a.id,this.glyph=this.build_glyph_view(n);var l=this.model.selection_glyph;null==l?l=i({fill:{},line:{}}):"auto"===l&&(l=i(d)),this.selection_glyph=this.build_glyph_view(l);var h=this.model.nonselection_glyph;null==h?h=i({fill:{},line:{}}):"auto"===h&&(h=i(v)),this.nonselection_glyph=this.build_glyph_view(h);var c=this.model.hover_glyph;null!=c&&(this.hover_glyph=this.build_glyph_view(c));var p=this.model.muted_glyph;null!=p&&(this.muted_glyph=this.build_glyph_view(p));var m=i(f);this.decimated_glyph=this.build_glyph_view(m),this.xscale=this.plot_view.frame.xscales[this.model.x_range_name],this.yscale=this.plot_view.frame.yscales[this.model.y_range_name],this.set_data(!1),this.model.data_source instanceof s.RemoteDataSource&&this.model.data_source.setup()},e.prototype.build_glyph_view=function(t){return new t.default_view({model:t,renderer:this,plot_view:this.plot_view,parent:this})},e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),this.connect(this.model.change,function(){return e.request_render()}),this.connect(this.model.glyph.change,function(){return e.set_data()}),this.connect(this.model.data_source.change,function(){return e.set_data()}),this.connect(this.model.data_source.streaming,function(){return e.set_data()}),this.connect(this.model.data_source.patching,function(t){return e.set_data(!0,t)}),this.connect(this.model.data_source._select,function(){return e.request_render()}),null!=this.hover_glyph&&this.connect(this.model.data_source.inspect,function(){return e.request_render()}),this.connect(this.model.properties.view.change,function(){return e.set_data()}),this.connect(this.model.view.change,function(){return e.set_data()});var i=this.plot_model.frame,n=i.x_ranges,r=i.y_ranges;for(var o in n){var s=n[o];s instanceof p.FactorRange&&this.connect(s.change,function(){return e.set_data()})}for(var a in r){var s=r[a];s instanceof p.FactorRange&&this.connect(s.change,function(){return e.set_data()})}this.connect(this.model.glyph.transformchange,function(){return e.set_data()})},e.prototype.have_selection_glyphs=function(){return null!=this.selection_glyph&&null!=this.nonselection_glyph},e.prototype.set_data=function(t,e){void 0===t&&(t=!0),void 0===e&&(e=null);var i=Date.now(),n=this.model.data_source;this.all_indices=this.model.view.indices,this.glyph.model.setv({x_range_name:this.model.x_range_name,y_range_name:this.model.y_range_name},{silent:!0}),this.glyph.set_data(n,this.all_indices,e),this.glyph.set_visuals(n),this.decimated_glyph.set_visuals(n),this.have_selection_glyphs()&&(this.selection_glyph.set_visuals(n),this.nonselection_glyph.set_visuals(n)),null!=this.hover_glyph&&this.hover_glyph.set_visuals(n),null!=this.muted_glyph&&this.muted_glyph.set_visuals(n);var r=this.plot_model.plot.lod_factor;this.decimated=[];for(var o=0,s=Math.floor(this.all_indices.length/r);o0?d["1d"].indices:function(){for(var t=[],e=0,i=Object.keys(d["2d"].indices);e0&&!i&&null!=y&&this.all_indices.length>y?(s=this.decimated,f=this.decimated_glyph,v=this.decimated_glyph,m=this.selection_glyph):(f=this.model.muted&&null!=this.muted_glyph?this.muted_glyph:this.glyph,v=this.nonselection_glyph,m=this.selection_glyph),null!=this.hover_glyph&&g.length&&(s=u.difference(s,g));var b,x=null;if(c.length&&this.have_selection_glyphs()){for(var w=Date.now(),k={},S=0,C=c;S0){for(var a=i[0],l=0,h=i;l0){for(var a=i[0],l=0,h=i;l0?this.selected_glyphs[0]:null},enumerable:!0,configurable:!0}),e.prototype.add_to_selected_glyphs=function(t){this.selected_glyphs.push(t)},e.prototype.update=function(t,e,i){this.final=e,i?this.update_through_union(t):(this.indices=t.indices,this.line_indices=t.line_indices,this.selected_glyphs=t.selected_glyphs,this.get_view=t.get_view,this.multiline_indices=t.multiline_indices)},e.prototype.clear=function(){this.final=!0,this.indices=[],this.line_indices=[],this.multiline_indices={},this.get_view=function(){return null},this.selected_glyphs=[]},e.prototype.is_empty=function(){return 0==this.indices.length&&0==this.line_indices.length},e.prototype.update_through_union=function(t){this.indices=s.union(t.indices,this.indices),this.selected_glyphs=s.union(t.selected_glyphs,this.selected_glyphs),this.line_indices=s.union(t.line_indices,this.line_indices),this.get_view()||(this.get_view=t.get_view),this.multiline_indices=a.merge(t.multiline_indices,this.multiline_indices)},e.prototype.update_through_intersection=function(t){this.indices=s.intersection(t.indices,this.indices),this.selected_glyphs=s.union(t.selected_glyphs,this.selected_glyphs),this.line_indices=s.union(t.line_indices,this.line_indices),this.get_view()||(this.get_view=t.get_view),this.multiline_indices=a.merge(t.multiline_indices,this.multiline_indices)},e}(r.Model);i.Selection=l,l.initClass()},function(t,e,i){var n=t(379),r=t(189),o=t(14),s=t(15),a=function(t){function e(e){var i=t.call(this,e)||this;return i.initialized=!1,i}return n.__extends(e,t),e.initClass=function(){this.prototype.type="AjaxDataSource",this.define({mode:[s.String,"replace"],content_type:[s.String,"application/json"],http_headers:[s.Any,{}],max_size:[s.Number],method:[s.String,"POST"],if_modified:[s.Bool,!1]})},e.prototype.destroy=function(){null!=this.interval&&clearInterval(this.interval),t.prototype.destroy.call(this)},e.prototype.setup=function(){var t=this;if(!this.initialized&&(this.initialized=!0,this.get_data(this.mode),this.polling_interval)){var e=function(){return t.get_data(t.mode,t.max_size,t.if_modified)};this.interval=setInterval(e,this.polling_interval)}},e.prototype.get_data=function(t,e,i){var n=this;void 0===e&&(e=0),void 0===i&&(i=!1);var r=this.prepare_request();r.addEventListener("load",function(){return n.do_load(r,t,e)}),r.addEventListener("error",function(){return n.do_error(r)}),r.send()},e.prototype.prepare_request=function(){var t=new XMLHttpRequest;t.open(this.method,this.data_url,!0),t.withCredentials=!1,t.setRequestHeader("Content-Type",this.content_type);var e=this.http_headers;for(var i in e){var n=e[i];t.setRequestHeader(i,n)}return t},e.prototype.do_load=function(t,e,i){if(200===t.status){var n=JSON.parse(t.responseText);switch(e){case"replace":this.data=n;break;case"append":for(var r=this.data,o=0,s=this.columns();o0?this.indices=a.intersection.apply(this,e):this.source instanceof l.ColumnarDataSource&&(this.indices=this.source.get_indices()),this.indices_map_to_subset()},e.prototype.indices_map_to_subset=function(){this.indices_map={};for(var t=0;ti?n.slice(-i):n}if(_.isTypedArray(t)){var r=t.length+e.length;if(null!=i&&r>i){var o=r-i,s=t.length,n=void 0;t.length1&&o.logger.warn("Bokeh does not support Polygons with holes in, only exterior ring used.");for(var p=t.coordinates[0],u=0;u1&&o.logger.warn("Bokeh does not support Polygons with holes in, only exterior ring used."),v.push(y[0])}for(var c=v.reduce(r),u=0;ui&&l0&&h.length>0){for(var _=r/c,p=s.range(0,c).map(function(t){return t*_}),d=0,f=p.slice(1);d1?this.interval=(e[1]-e[0])*o.ONE_DAY:this.interval=31*o.ONE_DAY},e.prototype.get_ticks_no_defaults=function(t,e,i,n){var r=function(t,e){var i=o.last_month_no_later_than(new Date(t)),n=o.last_month_no_later_than(new Date(e));n.setUTCMonth(n.getUTCMonth()+1);var r=[],s=i;for(;r.push(o.copy_date(s)),s.setUTCMonth(s.getUTCMonth()+1),!(s>n););return r}(t,e),s=this.days,l=this.interval,h=a.concat(r.map(function(t){return function(t,e){for(var i=[],n=0,r=s;n0&&o.length>0){for(var f=_/s,v=r.range(0,s).map(function(t){return t*f}),m=0,g=v.slice(1);m0&&o.length>0){for(var E=Math.pow(l,A)/s,v=r.range(1,s+1).map(function(t){return t*E}),M=0,O=v;M1?this.interval=(e[1]-e[0])*o.ONE_MONTH:this.interval=12*o.ONE_MONTH},e.prototype.get_ticks_no_defaults=function(t,e,i,n){var r=function(t,e){var i=o.last_year_no_later_than(new Date(t)),n=o.last_year_no_later_than(new Date(e));n.setUTCFullYear(n.getUTCFullYear()+1);var r=[],s=i;for(;r.push(o.copy_date(s)),s.setUTCFullYear(s.getUTCFullYear()+1),!(s>n););return r}(t,e),s=this.months,l=a.concat(r.map(function(t){return s.map(function(e){var i=o.copy_date(t);return i.setUTCMonth(e),i})})),h=l.map(function(t){return t.getTime()}),c=h.filter(function(i){return t<=i&&i<=e});return{major:c,minor:[]}},e}(r.SingleIntervalTicker);i.MonthsTicker=l,l.initClass()},function(t,e,i){var n=t(379),r=t(194),o=t(15),s=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="SingleIntervalTicker",this.define({interval:[o.Number]})},e.prototype.get_interval=function(t,e,i){return this.interval},Object.defineProperty(e.prototype,"min_interval",{get:function(){return this.interval},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"max_interval",{get:function(){return this.interval},enumerable:!0,configurable:!0}),e}(r.ContinuousTicker);i.SingleIntervalTicker=s,s.initClass()},function(t,e,i){var n=t(379),r=t(53),o=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="Ticker"},e}(r.Model);i.Ticker=o,o.initClass()},function(t,e,i){function n(t){return new Date(t.getTime())}function r(t){var e=n(t);return e.setUTCDate(1),e.setUTCHours(0),e.setUTCMinutes(0),e.setUTCSeconds(0),e.setUTCMilliseconds(0),e}i.ONE_MILLI=1,i.ONE_SECOND=1e3,i.ONE_MINUTE=60*i.ONE_SECOND,i.ONE_HOUR=60*i.ONE_MINUTE,i.ONE_DAY=24*i.ONE_HOUR,i.ONE_MONTH=30*i.ONE_DAY,i.ONE_YEAR=365*i.ONE_DAY,i.copy_date=n,i.last_month_no_later_than=r,i.last_year_no_later_than=function(t){var e=r(t);return e.setUTCMonth(0),e}},function(t,e,i){var n=t(379),r=t(191),o=t(202),s=t(204),a=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="YearsTicker"},e.prototype.initialize=function(){t.prototype.initialize.call(this),this.interval=s.ONE_YEAR,this.basic_ticker=new r.BasicTicker({num_minor_ticks:0})},e.prototype.get_ticks_no_defaults=function(t,e,i,n){var r=s.last_year_no_later_than(new Date(t)).getUTCFullYear(),o=s.last_year_no_later_than(new Date(e)).getUTCFullYear(),a=this.basic_ticker.get_ticks_no_defaults(r,o,i,n).major,l=a.map(function(t){return Date.UTC(t,0,1)}),h=l.filter(function(i){return t<=i&&i<=e});return{major:h,minor:[]}},e}(o.SingleIntervalTicker);i.YearsTicker=a,a.initClass()},function(t,e,i){var n=t(379),r=t(209),o=t(15),s=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="BBoxTileSource",this.define({use_latlon:[o.Bool,!1]})},e.prototype.get_image_url=function(t,e,i){var n,r,o,s,a=this.string_lookup_replace(this.url,this.extra_url_vars);return this.use_latlon?(l=this.get_tile_geographic_bounds(t,e,i),r=l[0],s=l[1],n=l[2],o=l[3]):(h=this.get_tile_meter_bounds(t,e,i),r=h[0],s=h[1],n=h[2],o=h[3]),a.replace("{XMIN}",r.toString()).replace("{YMIN}",s.toString()).replace("{XMAX}",n.toString()).replace("{YMAX}",o.toString());var l,h},e}(r.MercatorTileSource);i.BBoxTileSource=s,s.initClass()},function(t,e,i){var n=t(44),r=function(){function t(){this.images=[]}return t.prototype.pop=function(){var t=this.images.pop();return null!=t?t:new Image},t.prototype.push=function(t){if(!(this.images.length>50)){n.isArray(t)?(e=this.images).push.apply(e,t):this.images.push(t);var e}},t}();i.ImagePool=r},function(t,e,i){var n=t(206);i.BBoxTileSource=n.BBoxTileSource;var r=t(209);i.MercatorTileSource=r.MercatorTileSource;var o=t(210);i.QUADKEYTileSource=o.QUADKEYTileSource;var s=t(211);i.TileRenderer=s.TileRenderer;var a=t(212);i.TileSource=a.TileSource;var l=t(214);i.TMSTileSource=l.TMSTileSource;var h=t(215);i.WMTSTileSource=h.WMTSTileSource},function(t,e,i){var n=t(379),r=t(212),o=t(15),s=t(21),a=t(213),l=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="MercatorTileSource",this.define({snap_to_zoom:[o.Bool,!1],wrap_around:[o.Bool,!0]}),this.override({x_origin_offset:20037508.34,y_origin_offset:20037508.34,initial_resolution:156543.03392804097})},e.prototype.initialize=function(){var e=this;t.prototype.initialize.call(this),this._resolutions=s.range(this.min_zoom,this.max_zoom+1).map(function(t){return e.get_resolution(t)})},e.prototype._computed_initial_resolution=function(){return null!=this.initial_resolution?this.initial_resolution:2*Math.PI*6378137/this.tile_size},e.prototype.is_valid_tile=function(t,e,i){return!(!this.wrap_around&&(t<0||t>=Math.pow(2,i)))&&!(e<0||e>=Math.pow(2,i))},e.prototype.parent_by_tile_xyz=function(t,e,i){var n=this.tile_xyz_to_quadkey(t,e,i),r=n.substring(0,n.length-1);return this.quadkey_to_tile_xyz(r)},e.prototype.get_resolution=function(t){return this._computed_initial_resolution()/Math.pow(2,t)},e.prototype.get_resolution_by_extent=function(t,e,i){var n=(t[2]-t[0])/i,r=(t[3]-t[1])/e;return[n,r]},e.prototype.get_level_by_extent=function(t,e,i){for(var n=(t[2]-t[0])/i,r=(t[3]-t[1])/e,o=Math.max(n,r),s=0,a=0,l=this._resolutions;ah){if(0===s)return 0;if(s>0)return s-1}s+=1}throw new Error("unreachable code")},e.prototype.get_closest_level_by_extent=function(t,e,i){var n=(t[2]-t[0])/i,r=(t[3]-t[1])/e,o=Math.max(n,r),s=this._resolutions.reduce(function(t,e){return Math.abs(e-o)_?(h=s-r,c*=u):(h*=_,c=a-o)}var p=(h-(s-r))/2,d=(c-(a-o))/2;return[r-p,o-d,s+p,a+d]},e.prototype.tms_to_wmts=function(t,e,i){"Note this works both ways";return[t,Math.pow(2,i)-1-e,i]},e.prototype.wmts_to_tms=function(t,e,i){"Note this works both ways";return[t,Math.pow(2,i)-1-e,i]},e.prototype.pixels_to_meters=function(t,e,i){var n=this.get_resolution(i),r=t*n-this.x_origin_offset,o=e*n-this.y_origin_offset;return[r,o]},e.prototype.meters_to_pixels=function(t,e,i){var n=this.get_resolution(i),r=(t+this.x_origin_offset)/n,o=(e+this.y_origin_offset)/n;return[r,o]},e.prototype.pixels_to_tile=function(t,e){var i=Math.ceil(t/this.tile_size);i=0===i?i:i-1;var n=Math.max(Math.ceil(e/this.tile_size)-1,0);return[i,n]},e.prototype.pixels_to_raster=function(t,e,i){var n=this.tile_size<=h;d--)for(var f=l;f<=u;f++)this.is_valid_tile(f,d,e)&&p.push([f,d,e,this.get_tile_meter_bounds(f,d,e)]);return this.sort_tiles_from_center(p,[l,h,u,_]),p},e.prototype.quadkey_to_tile_xyz=function(t){for(var e=0,i=0,n=t.length,r=n;r>0;r--){var o=t.charAt(n-r),s=1<0;r--){var o=1<0;)if(r=r.substring(0,r.length-1),s=this.quadkey_to_tile_xyz(r),t=s[0],e=s[1],i=s[2],a=this.denormalize_xyz(t,e,i,n),t=a[0],e=a[1],i=a[2],this.tile_xyz_to_key(t,e,i)in this.tiles)return[t,e,i];return[0,0,0];var o,s,a},e.prototype.normalize_xyz=function(t,e,i){if(this.wrap_around){var n=Math.pow(2,i);return[(t%n+n)%n,e,i]}return[t,e,i]},e.prototype.denormalize_xyz=function(t,e,i,n){return[t+n*Math.pow(2,i),e,i]},e.prototype.denormalize_meters=function(t,e,i,n){return[t+2*n*Math.PI*6378137,e]},e.prototype.calculate_world_x_by_tile_xyz=function(t,e,i){return Math.floor(t/Math.pow(2,i))},e}(r.TileSource);i.MercatorTileSource=l,l.initClass()},function(t,e,i){var n=t(379),r=t(209),o=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="QUADKEYTileSource"},e.prototype.get_image_url=function(t,e,i){var n=this.string_lookup_replace(this.url,this.extra_url_vars),r=this.tms_to_wmts(t,e,i),o=r[0],s=r[1],a=r[2],l=this.tile_xyz_to_quadkey(o,s,a);return n.replace("{Q}",l)},e}(r.MercatorTileSource);i.QUADKEYTileSource=o,o.initClass()},function(t,e,i){var n=t(379),r=t(207),o=t(215),s=t(173),a=t(5),l=t(15),h=t(21),c=t(44),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.initialize=function(e){this.attributionEl=null,this._tiles=[],t.prototype.initialize.call(this,e)},e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),this.connect(this.model.change,function(){return e.request_render()})},e.prototype.get_extent=function(){return[this.x_range.start,this.y_range.start,this.x_range.end,this.y_range.end]},Object.defineProperty(e.prototype,"map_plot",{get:function(){return this.plot_model.plot},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"map_canvas",{get:function(){return this.plot_view.canvas_view.ctx},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"map_frame",{get:function(){return this.plot_model.frame},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"x_range",{get:function(){return this.map_plot.x_range},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y_range",{get:function(){return this.map_plot.y_range},enumerable:!0,configurable:!0}),e.prototype._set_data=function(){this.pool=new r.ImagePool,this.extent=this.get_extent(),this._last_height=void 0,this._last_width=void 0},e.prototype._add_attribution=function(){var t=this.model.tile_source.attribution;if(c.isString(t)&&t.length>0){if(null==this.attributionEl){var e=this.plot_model.canvas._right.value-this.plot_model.frame._right.value,i=this.plot_model.canvas._bottom.value-this.plot_model.frame._bottom.value,n=this.map_frame._width.value;this.attributionEl=a.div({class:"bk-tile-attribution",style:{position:"absolute",bottom:i+"px",right:e+"px","max-width":n+"px",padding:"2px","background-color":"rgba(255,255,255,0.8)","font-size":"9pt","font-family":"sans-serif"}});var r=this.plot_view.canvas_view.events_el;r.appendChild(this.attributionEl)}this.attributionEl.innerHTML=t}},e.prototype._map_data=function(){this.initial_extent=this.get_extent();var t=this.model.tile_source.get_level_by_extent(this.initial_extent,this.map_frame._height.value,this.map_frame._width.value),e=this.model.tile_source.snap_to_zoom_level(this.initial_extent,this.map_frame._height.value,this.map_frame._width.value,t);this.x_range.start=e[0],this.y_range.start=e[1],this.x_range.end=e[2],this.y_range.end=e[3],this._add_attribution()},e.prototype._on_tile_load=function(t,e){t.img=e.target,t.loaded=!0,this.request_render()},e.prototype._on_tile_cache_load=function(t,e){t.img=e.target,t.loaded=!0,t.finished=!0,this.notify_finished()},e.prototype._on_tile_error=function(t){t.finished=!0},e.prototype._create_tile=function(t,e,i,n,r){void 0===r&&(r=!1);var o=this.model.tile_source.normalize_xyz(t,e,i),s=o[0],a=o[1],l=o[2],h=this.pool.pop(),c={img:h,tile_coords:[t,e,i],normalized_coords:[s,a,l],quadkey:this.model.tile_source.tile_xyz_to_quadkey(t,e,i),cache_key:this.model.tile_source.tile_xyz_to_key(t,e,i),bounds:n,loaded:!1,finished:!1,x_coord:n[0],y_coord:n[3]};h.onload=r?this._on_tile_cache_load.bind(this,c):this._on_tile_load.bind(this,c),h.onerror=this._on_tile_error.bind(this,c),h.alt="",h.src=this.model.tile_source.get_image_url(s,a,l),this.model.tile_source.tiles[c.cache_key]=c,this._tiles.push(c)},e.prototype._enforce_aspect_ratio=function(){if(this._last_height!==this.map_frame._height.value||this._last_width!==this.map_frame._width.value){var t=this.get_extent(),e=this.model.tile_source.get_level_by_extent(t,this.map_frame._height.value,this.map_frame._width.value),i=this.model.tile_source.snap_to_zoom_level(t,this.map_frame._height.value,this.map_frame._width.value,e);return this.x_range.setv({start:i[0],end:i[2]}),this.y_range.setv({start:i[1],end:i[3]}),this.extent=i,this._last_height=this.map_frame._height.value,this._last_width=this.map_frame._width.value,!0}return!1},e.prototype.has_finished=function(){if(!t.prototype.has_finished.call(this))return!1;if(0===this._tiles.length)return!1;for(var e=0,i=this._tiles;en&&(r=this.extent,l=n,c=!0),c&&(this.x_range.setv({x_range:{start:r[0],end:r[2]}}),this.y_range.setv({start:r[1],end:r[3]}),this.extent=r),this.extent=r;for(var u=e.get_tiles_by_extent(r,l),_=[],p=[],d=[],f=[],v=0,m=u;v=o?[1,_/o]:[o/_,1])[0];t[0]<=e[0]?(n=t[0],(r=t[0]+c*p)>s&&(r=s)):(r=t[0],(n=t[0]-c*p)l&&(d=l)):(d=t[1],(f=t[1]-c/o)r.end)&&(this.v_axis_only=!0),(io.end)&&(this.h_axis_only=!0)}null!=this.model.document&&this.model.document.interactive_start(this.plot_model.plot)},e.prototype._pan=function(t){this._update(t.deltaX,t.deltaY),null!=this.model.document&&this.model.document.interactive_start(this.plot_model.plot)},e.prototype._pan_end=function(t){this.h_axis_only=!1,this.v_axis_only=!1,null!=this.pan_info&&this.plot_view.push_state("pan",{range:this.pan_info})},e.prototype._update=function(t,e){var i,n,r,o=this.plot_model.frame,s=t-this.last_dx,a=e-this.last_dy,l=o.bbox.h_range,h=l.start-s,c=l.end-s,u=o.bbox.v_range,_=u.start-a,p=u.end-a,d=this.model.dimensions;"width"!=d&&"both"!=d||this.v_axis_only?(i=l.start,n=l.end,r=0):(i=h,n=c,r=-s);var f,v,m;"height"!=d&&"both"!=d||this.h_axis_only?(f=u.start,v=u.end,m=0):(f=_,v=p,m=-a),this.last_dx=t,this.last_dy=e;var g=o.xscales,y=o.yscales,b={};for(var x in g){var w=g[x],k=w.r_invert(i,n),S=k[0],C=k[1];b[x]={start:S,end:C}}var T={};for(var A in y){var w=y[A],E=w.r_invert(f,v),S=E[0],C=E[1];T[A]={start:S,end:C}}this.pan_info={xrs:b,yrs:T,sdx:r,sdy:m},this.plot_view.update_range(this.pan_info,!0)},e}(r.GestureToolView);i.PanToolView=s;var a=function(t){function e(e){var i=t.call(this,e)||this;return i.tool_name="Pan",i.event_type="pan",i.default_order=10,i}return n.__extends(e,t),e.initClass=function(){this.prototype.type="PanTool",this.prototype.default_view=s,this.define({dimensions:[o.Dimensions,"both"]})},Object.defineProperty(e.prototype,"tooltip",{get:function(){return this._get_dim_tooltip("Pan",this.dimensions)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"icon",{get:function(){switch(this.dimensions){case"both":return"bk-tool-icon-pan";case"width":return"bk-tool-icon-xpan";case"height":return"bk-tool-icon-ypan"}},enumerable:!0,configurable:!0}),e}(r.GestureTool);i.PanTool=a,a.initClass()},function(t,e,i){var n=t(379),r=t(236),o=t(65),s=t(5),a=t(15),l=t(21),h=t(32),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.initialize=function(e){t.prototype.initialize.call(this,e),this.data={sx:[],sy:[]}},e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),this.connect(this.model.properties.active.change,function(){return e._active_change()})},e.prototype._active_change=function(){this.model.active||this._clear_data()},e.prototype._keyup=function(t){t.keyCode==s.Keys.Enter&&this._clear_data()},e.prototype._doubletap=function(t){var e=t.shiftKey;this._do_select(this.data.sx,this.data.sy,!0,e),this.plot_view.push_state("poly_select",{selection:this.plot_view.get_selection()}),this._clear_data()},e.prototype._clear_data=function(){this.data={sx:[],sy:[]},this.model.overlay.update({xs:[],ys:[]})},e.prototype._tap=function(t){var e=t.sx,i=t.sy,n=this.plot_model.frame;n.bbox.contains(e,i)&&(this.data.sx.push(e),this.data.sy.push(i),this.model.overlay.update({xs:l.copy(this.data.sx),ys:l.copy(this.data.sy)}))},e.prototype._do_select=function(t,e,i,n){var r={type:"poly",sx:t,sy:e};this._select(r,i,n)},e.prototype._emit_callback=function(t){var e=this.computed_renderers[0],i=this.plot_model.frame,n=i.xscales[e.x_range_name],r=i.yscales[e.y_range_name],o=n.v_invert(t.sx),s=r.v_invert(t.sy),a=h.extend({x:o,y:s},t);this.model.callback.execute(this.model,{geometry:a})},e}(r.SelectToolView);i.PolySelectToolView=c;var u=function(){return new o.PolyAnnotation({level:"overlay",xs_units:"screen",ys_units:"screen",fill_color:{value:"lightgrey"},fill_alpha:{value:.5},line_color:{value:"black"},line_alpha:{value:1},line_width:{value:2},line_dash:{value:[4,4]}})},_=function(t){function e(e){var i=t.call(this,e)||this;return i.tool_name="Poly Select",i.icon="bk-tool-icon-polygon-select",i.event_type="tap",i.default_order=11,i}return n.__extends(e,t),e.initClass=function(){this.prototype.type="PolySelectTool",this.prototype.default_view=c,this.define({callback:[a.Instance],overlay:[a.Instance,u]})},e}(r.SelectTool);i.PolySelectTool=_,_.initClass()},function(t,e,i){var n=t(379),r=t(232),o=t(169),s=t(170),a=t(15),l=t(32),h=t(21),c=t(5),u=t(3),_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),Object.defineProperty(e.prototype,"computed_renderers",{get:function(){var t=this.model.renderers,e=this.model.names;if(0==t.length){var i=this.plot_model.plot.renderers;t=i.filter(function(t){return t instanceof o.GlyphRenderer||t instanceof s.GraphRenderer})}return e.length>0&&(t=t.filter(function(t){return h.includes(e,t.name)})),t},enumerable:!0,configurable:!0}),e.prototype._computed_renderers_by_data_source=function(){for(var t={},e=0,i=this.computed_renderers;e.9?e=.9:e<-.9&&(e=-.9),this._update_ranges(e)},e.prototype._update_ranges=function(t){var e,i,n,r,o=this.plot_model.frame,s=o.bbox.h_range,a=o.bbox.v_range,l=[s.start,s.end],h=l[0],c=l[1],u=[a.start,a.end],_=u[0],p=u[1];switch(this.model.dimension){case"height":var d=Math.abs(p-_);e=h,i=c,n=_-d*t,r=p-d*t;break;case"width":var f=Math.abs(c-h);e=h-f*t,i=c-f*t,n=_,r=p;break;default:throw new Error("this shouldn't have happened")}var v=o.xscales,m=o.yscales,g={};for(var y in v){var b=v[y],x=b.r_invert(e,i),w=x[0],k=x[1];g[y]={start:w,end:k}}var S={};for(var C in m){var b=m[C],T=b.r_invert(n,r),w=T[0],k=T[1];S[C]={start:w,end:k}}var A={xrs:g,yrs:S,factor:t};this.plot_view.push_state("wheel_pan",{range:A}),this.plot_view.update_range(A,!1,!0),null!=this.model.document&&this.model.document.interactive_start(this.plot_model.plot)},e}(r.GestureToolView);i.WheelPanToolView=s;var a=function(t){function e(e){var i=t.call(this,e)||this;return i.tool_name="Wheel Pan",i.icon="bk-tool-icon-wheel-pan",i.event_type="scroll",i.default_order=12,i}return n.__extends(e,t),e.initClass=function(){this.prototype.type="WheelPanTool",this.prototype.default_view=s,this.define({dimension:[o.Dimension,"width"]}),this.internal({speed:[o.Number,.001]})},Object.defineProperty(e.prototype,"tooltip",{get:function(){return this._get_dim_tooltip(this.tool_name,this.dimension)},enumerable:!0,configurable:!0}),e}(r.GestureTool);i.WheelPanTool=a,a.initClass()},function(t,e,i){var n=t(379),r=t(232),o=t(46),s=t(15),a=t(20),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype._pinch=function(t){var e,i=t.sx,n=t.sy,r=t.scale;e=r>=1?20*(r-1):-20/r,this._scroll({type:"mousewheel",sx:i,sy:n,delta:e})},e.prototype._scroll=function(t){var e=this.plot_model.frame,i=e.bbox.h_range,n=e.bbox.v_range,r=t.sx,s=t.sy,a=this.model.dimensions,l=("width"==a||"both"==a)&&i.start0&&(t=t.filter(function(t){return f.includes(e,t.name)})),t},e.prototype._compute_ttmodels=function(){var t={},e=this.model.tooltips;if(null!=e)for(var i=0,n=this.computed_renderers;i=0){var v=c.match(/\$color(\[.*\])?:(\w*)/),g=v[1],y=void 0===g?"":g,b=v[2],x=t.get_column(b);if(null==x){var w=_.span({},b+" unknown");f.appendChild(w);continue}var k=y.indexOf("hex")>=0,S=y.indexOf("swatch")>=0,C=x[e];if(null==C){var T=_.span({},"(null)");f.appendChild(T);continue}k&&(C=d.color2hex(C));var r=_.span({},C);f.appendChild(r),S&&(r=_.span({class:"bk-tooltip-color-block",style:{backgroundColor:C}}," "),f.appendChild(r))}else{var r=_.span();r.innerHTML=u.replace_placeholders(c.replace("$~","$data_"),t,e,this.model.formatters,i),f.appendChild(r)}}return o},e}(s.InspectToolView);i.HoverToolView=y;var b=function(t){function e(e){var i=t.call(this,e)||this;return i.tool_name="Hover",i.icon="bk-tool-icon-hover",i}return o.__extends(e,t),e.initClass=function(){this.prototype.type="HoverTool",this.prototype.default_view=y,this.define({tooltips:[p.Any,[["index","$index"],["data (x, y)","($x, $y)"],["screen (x, y)","($sx, $sy)"]]],formatters:[p.Any,{}],renderers:[p.Array,[]],names:[p.Array,[]],mode:[p.String,"mouse"],point_policy:[p.String,"snap_to_data"],line_policy:[p.String,"nearest"],show_arrow:[p.Boolean,!0],anchor:[p.String,"center"],attachment:[p.String,"horizontal"],callback:[p.Any]})},e}(s.InspectTool);i.HoverTool=b,b.initClass()},function(t,e,i){var n=t(379),r=t(224),o=t(244),s=t(15),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e}(r.ButtonToolView);i.InspectToolView=a;var l=function(t){function e(e){var i=t.call(this,e)||this;return i.event_type="move",i}return n.__extends(e,t),e.initClass=function(){this.prototype.type="InspectTool",this.prototype.button_view=o.OnOffButtonView,this.define({toggleable:[s.Bool,!0]}),this.override({active:!0})},e}(r.ButtonTool);i.InspectTool=l,l.initClass()},function(t,e,i){var n=t(379),r=t(224),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.render=function(){t.prototype.render.call(this),this.model.active?this.el.classList.add("bk-active"):this.el.classList.remove("bk-active")},e.prototype._clicked=function(){var t=this.model.active;this.model.active=!t},e}(r.ButtonToolButtonView);i.OnOffButtonView=o},function(t,e,i){var n=t(379),r=t(15),o=t(48),s=t(21),a=t(53),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.initialize=function(e){t.prototype.initialize.call(this,e),this.plot_view=e.plot_view},Object.defineProperty(e.prototype,"plot_model",{get:function(){return this.plot_view.model},enumerable:!0,configurable:!0}),e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),this.connect(this.model.properties.active.change,function(){e.model.active?e.activate():e.deactivate()})},e.prototype.activate=function(){},e.prototype.deactivate=function(){},e}(o.View);i.ToolView=l;var h=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="Tool",this.internal({active:[r.Boolean,!1]})},Object.defineProperty(e.prototype,"synthetic_renderers",{get:function(){return[]},enumerable:!0,configurable:!0}),e.prototype._get_dim_tooltip=function(t,e){switch(e){case"width":return t+" (x-axis)";case"height":return t+" (y-axis)";case"both":return t}},e.prototype._get_dim_limits=function(t,e,i,n){var r,o=t[0],a=t[1],l=e[0],h=e[1],c=i.bbox.h_range;"width"==n||"both"==n?(r=[s.min([o,l]),s.max([o,l])],r=[s.max([r[0],c.start]),s.min([r[1],c.end])]):r=[c.start,c.end];var u,_=i.bbox.v_range;return"height"==n||"both"==n?(u=[s.min([a,h]),s.max([a,h])],u=[s.max([u[0],_.start]),s.min([u[1],_.end])]):u=[_.start,_.end],[r,u]},e}(a.Model);i.Tool=h,h.initClass()},function(t,e,i){var n=t(379),r=t(15),o=t(19),s=t(53),a=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="ToolProxy",this.define({tools:[r.Array,[]],active:[r.Bool,!1],disabled:[r.Bool,!1]})},Object.defineProperty(e.prototype,"button_view",{get:function(){return this.tools[0].button_view},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"event_type",{get:function(){return this.tools[0].event_type},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tooltip",{get:function(){return this.tools[0].tool_name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tool_name",{get:function(){return this.tools[0].tool_name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"icon",{get:function(){return this.tools[0].icon},enumerable:!0,configurable:!0}),e.prototype.initialize=function(){t.prototype.initialize.call(this),this.do=new o.Signal0(this,"do")},e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),this.connect(this.do,function(){return e.doit()}),this.connect(this.properties.active.change,function(){return e.set_active()})},e.prototype.doit=function(){for(var t=0,e=this.tools;t0){var k=b(w);u.tools.push(k),this.connect(k.properties.active.change,this._active_change.bind(this,k))}}}this.actions=[];for(var x in i){var w=i[x];w.length>0&&this.actions.push(b(w))}this.inspectors=[];for(var x in e){var w=e[x];w.length>0&&this.inspectors.push(b(w,!0))}for(var S in this.gestures){var u=this.gestures[S];0!=u.tools.length&&(u.tools=l.sortBy(u.tools,function(t){return t.default_order}),"pinch"!=S&&"scroll"!=S&&"multi"!=S&&(u.tools[0].active=!0))}var C},e}(p.ToolbarBase);i.ProxyToolbar=m,m.initClass();var g=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.initialize=function(e){t.prototype.initialize.call(this,e),this.model.toolbar.toolbar_location=this.model.toolbar_location,this._toolbar_views={},v.build_views(this._toolbar_views,[this.model.toolbar],{parent:this})},e.prototype.remove=function(){v.remove_views(this._toolbar_views),t.prototype.remove.call(this)},e.prototype.css_classes=function(){return t.prototype.css_classes.call(this).concat("bk-toolbar-box")},e.prototype.render=function(){t.prototype.render.call(this);var e=this._toolbar_views[this.model.toolbar.id];e.render(),o.empty(this.el),this.el.appendChild(e.el)},e.prototype.get_width=function(){return this.model.toolbar.vertical?30:null},e.prototype.get_height=function(){return this.model.toolbar.horizontal?30:null},e}(f.LayoutDOMView);i.ToolbarBoxView=g;var y=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="ToolbarBox",this.prototype.default_view=g,this.define({toolbar:[r.Instance],toolbar_location:[r.Location,"right"]})},Object.defineProperty(e.prototype,"sizing_mode",{get:function(){switch(this.toolbar_location){case"above":case"below":return"scale_width";case"left":case"right":return"scale_height"}},enumerable:!0,configurable:!0}),e}(f.LayoutDOM);i.ToolbarBox=y,y.initClass()},function(t,e,i){var n=t(379),r=t(257),o=t(15),s=t(32),a=function(e){function r(t){return e.call(this,t)||this}return n.__extends(r,e),r.initClass=function(){this.prototype.type="CustomJSTransform",this.define({args:[o.Any,{}],func:[o.String,""],v_func:[o.String,""]})},Object.defineProperty(r.prototype,"values",{get:function(){return s.values(this.args)},enumerable:!0,configurable:!0}),r.prototype._make_transform=function(t,e){return new(Function.bind.apply(Function,[void 0].concat(s.keys(this.args),[t,"require","exports",e])))},Object.defineProperty(r.prototype,"scalar_transform",{get:function(){return this._make_transform("x",this.func)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"vector_transform",{get:function(){return this._make_transform("xs",this.v_func)},enumerable:!0,configurable:!0}),r.prototype.compute=function(e){return this.scalar_transform.apply(this,this.values.concat([e,t,i]))},r.prototype.v_compute=function(e){return this.vector_transform.apply(this,this.values.concat([e,t,i]))},r}(r.Transform);i.CustomJSTransform=a,a.initClass()},function(t,e,i){var n=t(379),r=t(257),o=t(165),s=t(15),a=t(44),l=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="Dodge",this.define({value:[s.Number,0],range:[s.Instance]})},e.prototype.v_compute=function(t){var e;if(this.range instanceof o.FactorRange)e=this.range.v_synthetic(t);else{if(!a.isArrayableOf(t,a.isNumber))throw new Error("unexpected");e=t}for(var i=new Float64Array(e.length),n=0;ne.x?-1:t.x==e.x?0:1}):r.sort(function(t,e){return t.xthis._x_sorted[this._x_sorted.length-1])return NaN}else{if(tthis._x_sorted[this._x_sorted.length-1])return this._y_sorted[this._y_sorted.length-1]}if(t==this._x_sorted[0])return this._y_sorted[0];var e=r.findLastIndex(this._x_sorted,function(e){return ethis._x_sorted[this._x_sorted.length-1])return NaN}else{if(tthis._x_sorted[this._x_sorted.length-1])return this._y_sorted[this._y_sorted.length-1]}var e;switch(this.mode){case"after":e=s.findLastIndex(this._x_sorted,function(e){return t>=e});break;case"before":e=s.findIndex(this._x_sorted,function(e){return t<=e});break;case"center":var i=this._x_sorted.map(function(e){return Math.abs(e-t)}),n=s.min(i);e=s.findIndex(i,function(t){return n===t});break;default:throw new Error("unknown mode: "+this.mode)}return-1!=e?this._y_sorted[e]:NaN},e}(r.Interpolator);i.StepInterpolator=a,a.initClass()},function(t,e,i){var n=t(379),r=t(53),o=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type="Transform"},e}(r.Model);i.Transform=o,o.initClass()},function(t,e,i){"function"!=typeof WeakMap&&t(328),"function"!=typeof Set&&t(318),Number.isInteger||(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t});var n=String.prototype;n.repeat||(n.repeat=function(t){if(null==this)throw new TypeError("can't convert "+this+" to object");var e=""+this;if((t=+t)!=t&&(t=0),t<0)throw new RangeError("repeat count must be non-negative");if(t==1/0)throw new RangeError("repeat count must be less than infinity");if(t=Math.floor(t),0==e.length||0==t)return"";if(e.length*t>=1<<28)throw new RangeError("repeat count must not overflow maximum string size");for(var i="";1==(1&t)&&(i+=e),0!=(t>>>=1);)e+=e;return i}),Array.from||(Array.from=function(){var t=Object.prototype.toString,e=function(e){return"function"==typeof e||"[object Function]"===t.call(e)},i=Math.pow(2,53)-1,n=function(t){var e=function(t){var e=Number(t);if(isNaN(e))return 0;if(0===e||!isFinite(e))return e;return(e>0?1:-1)*Math.floor(Math.abs(e))}(t);return Math.min(Math.max(e,0),i)};return function(t){var i=Object(t);if(null==t)throw new TypeError("Array.from requires an array-like object - not null or undefined");var r,o=arguments.length>1?arguments[1]:void 0;if(void 0!==o){if(!e(o))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(r=arguments[2])}for(var s=n(i.length),a=e(this)?Object(new this(s)):new Array(s),l=0;l0)throw new Error("BokehJS only supports receiving buffers, not sending");var i=JSON.stringify(this.header),n=JSON.stringify(this.metadata),r=JSON.stringify(this.content);t.send(i),t.send(n),t.send(r)},t.prototype.msgid=function(){return this.header.msgid},t.prototype.msgtype=function(){return this.header.msgtype},t.prototype.reqid=function(){return this.header.reqid},t.prototype.problem=function(){return"msgid"in this.header?"msgtype"in this.header?null:"No msgtype in header":"No msgid in header"},t}();i.Message=r},function(t,e,i){var n=t(260),r=function(){function t(){this.message=null,this._partial=null,this._fragments=[],this._buf_header=null,this._current_consumer=this._HEADER}return t.prototype.consume=function(t){this._current_consumer(t)},t.prototype._HEADER=function(t){this._assume_text(t),this.message=null,this._partial=null,this._fragments=[t],this._buf_header=null,this._current_consumer=this._METADATA},t.prototype._METADATA=function(t){this._assume_text(t),this._fragments.push(t),this._current_consumer=this._CONTENT},t.prototype._CONTENT=function(t){this._assume_text(t),this._fragments.push(t);var e=this._fragments.slice(0,3),i=e[0],r=e[1],o=e[2];this._partial=n.Message.assemble(i,r,o),this._check_complete()},t.prototype._BUFFER_HEADER=function(t){this._assume_text(t),this._buf_header=t,this._current_consumer=this._BUFFER_PAYLOAD},t.prototype._BUFFER_PAYLOAD=function(t){this._assume_binary(t),this._partial.assemble_buffer(this._buf_header,t),this._check_complete()},t.prototype._assume_text=function(t){if(t instanceof ArrayBuffer)throw new Error("Expected text fragment but received binary fragment")},t.prototype._assume_binary=function(t){if(!(t instanceof ArrayBuffer))throw new Error("Expected binary fragment but received text fragment")},t.prototype._check_complete=function(){this._partial.complete()?(this.message=this._partial,this._current_consumer=this._HEADER):this._current_consumer=this._BUFFER_HEADER},t}();i.Receiver=r},function(t,e,i){i.safely=function(t,e){void 0===e&&(e=!1);try{return t()}catch(t){if(function(t){var e=document.createElement("div");e.style.backgroundColor="#f2dede",e.style.border="1px solid #a94442",e.style.borderRadius="4px",e.style.display="inline-block",e.style.fontFamily="sans-serif",e.style.marginTop="5px",e.style.minWidth="200px",e.style.padding="5px 5px 5px 10px";var i=document.createElement("span");i.style.backgroundColor="#a94442",i.style.borderRadius="0px 4px 0px 0px",i.style.color="white",i.style.cursor="pointer",i.style.cssFloat="right",i.style.fontSize="0.8em",i.style.margin="-6px -6px 0px 0px",i.style.padding="2px 5px 4px 5px",i.title="close",i.setAttribute("aria-label","close"),i.appendChild(document.createTextNode("x")),i.addEventListener("click",function(){return o.removeChild(e)});var n=document.createElement("h3");n.style.color="#a94442",n.style.margin="8px 0px 0px 0px",n.style.padding="0px",n.appendChild(document.createTextNode("Bokeh Error"));var r=document.createElement("pre");r.style.whiteSpace="unset",r.style.overflowX="auto",r.appendChild(document.createTextNode(t.message||t)),e.appendChild(i),e.appendChild(n),e.appendChild(r);var o=document.getElementsByTagName("body")[0];o.insertBefore(e,o.firstChild)}(t),e)return;throw t}}},function(t,e,i){i.version="0.12.15"},/*!! + * Canvas 2 Svg v1.0.21 + * A low level canvas to SVG converter. Uses a mock canvas context to build an SVG document. + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/mit-license.php + * + * Author: + * Kerry Liu + * + * Copyright (c) 2014 Gliffy Inc. + */ +function(t,e,i){!function(){"use strict";function t(t,e){var i,n=Object.keys(e);for(i=0;i1?((e=i).width=arguments[0],e.height=arguments[1]):e=t||i,!(this instanceof r))return new r(e);this.width=e.width||i.width,this.height=e.height||i.height,this.enableMirroring=void 0!==e.enableMirroring?e.enableMirroring:i.enableMirroring,this.canvas=this,this.__document=e.document||document,e.ctx?this.__ctx=e.ctx:(this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d")),this.__setDefaultStyles(),this.__stack=[this.__getStyleState()],this.__groupStack=[],this.__root=this.__document.createElementNS("http://www.w3.org/2000/svg","svg"),this.__root.setAttribute("version",1.1),this.__root.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.__root.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),this.__root.setAttribute("width",this.width),this.__root.setAttribute("height",this.height),this.__ids={},this.__defs=this.__document.createElementNS("http://www.w3.org/2000/svg","defs"),this.__root.appendChild(this.__defs),this.__currentElement=this.__document.createElementNS("http://www.w3.org/2000/svg","g"),this.__root.appendChild(this.__currentElement)}).prototype.__createElement=function(t,e,i){void 0===e&&(e={});var n,r,o=this.__document.createElementNS("http://www.w3.org/2000/svg",t),s=Object.keys(e);for(i&&(o.setAttribute("fill","none"),o.setAttribute("stroke","none")),n=0;n0){"path"===this.__currentElement.nodeName&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:e,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());var i=this.__createElement("g");e.appendChild(i),this.__currentElement=i}var n=this.__currentElement.getAttribute("transform");n?n+=" ":n="",n+=t,this.__currentElement.setAttribute("transform",n)},r.prototype.scale=function(e,i){void 0===i&&(i=e),this.__addTransform(t("scale({x},{y})",{x:e,y:i}))},r.prototype.rotate=function(e){var i=180*e/Math.PI;this.__addTransform(t("rotate({angle},{cx},{cy})",{angle:i,cx:0,cy:0}))},r.prototype.translate=function(e,i){this.__addTransform(t("translate({x},{y})",{x:e,y:i}))},r.prototype.transform=function(e,i,n,r,o,s){this.__addTransform(t("matrix({a},{b},{c},{d},{e},{f})",{a:e,b:i,c:n,d:r,e:o,f:s}))},r.prototype.beginPath=function(){var t;this.__currentDefaultPath="",this.__currentPosition={},t=this.__createElement("path",{},!0),this.__closestGroupOrSvg().appendChild(t),this.__currentElement=t},r.prototype.__applyCurrentDefaultPath=function(){var t=this.__currentElement;"path"===t.nodeName?t.setAttribute("d",this.__currentDefaultPath):console.error("Attempted to apply path command to node",t.nodeName)},r.prototype.__addPathCommand=function(t){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=t},r.prototype.moveTo=function(e,i){"path"!==this.__currentElement.nodeName&&this.beginPath(),this.__currentPosition={x:e,y:i},this.__addPathCommand(t("M {x} {y}",{x:e,y:i}))},r.prototype.closePath=function(){this.__currentDefaultPath&&this.__addPathCommand("Z")},r.prototype.lineTo=function(e,i){this.__currentPosition={x:e,y:i},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(t("L {x} {y}",{x:e,y:i})):this.__addPathCommand(t("M {x} {y}",{x:e,y:i}))},r.prototype.bezierCurveTo=function(e,i,n,r,o,s){this.__currentPosition={x:o,y:s},this.__addPathCommand(t("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:e,cp1y:i,cp2x:n,cp2y:r,x:o,y:s}))},r.prototype.quadraticCurveTo=function(e,i,n,r){this.__currentPosition={x:n,y:r},this.__addPathCommand(t("Q {cpx} {cpy} {x} {y}",{cpx:e,cpy:i,x:n,y:r}))};var l=function(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]};r.prototype.arcTo=function(t,e,i,n,r){var o=this.__currentPosition&&this.__currentPosition.x,s=this.__currentPosition&&this.__currentPosition.y;if(void 0!==o&&void 0!==s){if(r<0)throw new Error("IndexSizeError: The radius provided ("+r+") is negative.");if(o===t&&s===e||t===i&&e===n||0===r)this.lineTo(t,e);else{var a=l([o-t,s-e]),h=l([i-t,n-e]);if(a[0]*h[1]!=a[1]*h[0]){var c=a[0]*h[0]+a[1]*h[1],u=Math.acos(Math.abs(c)),_=l([a[0]+h[0],a[1]+h[1]]),p=r/Math.sin(u/2),d=t+p*_[0],f=e+p*_[1],v=[-a[1],a[0]],m=[h[1],-h[0]],g=function(t){var e=t[0],i=t[1];return i>=0?Math.acos(e):-Math.acos(e)},y=g(v),b=g(m);this.lineTo(d+v[0]*r,f+v[1]*r),this.arc(d,f,r,y,b)}else this.lineTo(t,e)}}},r.prototype.stroke=function(){"path"===this.__currentElement.nodeName&&this.__currentElement.setAttribute("paint-order","fill stroke markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("stroke")},r.prototype.fill=function(){"path"===this.__currentElement.nodeName&&this.__currentElement.setAttribute("paint-order","stroke fill markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("fill")},r.prototype.rect=function(t,e,i,n){"path"!==this.__currentElement.nodeName&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+i,e),this.lineTo(t+i,e+n),this.lineTo(t,e+n),this.lineTo(t,e),this.closePath()},r.prototype.fillRect=function(t,e,i,n){var r;r=this.__createElement("rect",{x:t,y:e,width:i,height:n},!0),this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("fill")},r.prototype.strokeRect=function(t,e,i,n){var r;r=this.__createElement("rect",{x:t,y:e,width:i,height:n},!0),this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("stroke")},r.prototype.__clearCanvas=function(){for(var t=this.__closestGroupOrSvg(),e=t.getAttribute("transform"),i=this.__root.childNodes[1],n=i.childNodes,r=n.length-1;r>=0;r--)n[r]&&i.removeChild(n[r]);this.__currentElement=i,this.__groupStack=[],e&&this.__addTransform(e)},r.prototype.clearRect=function(t,e,i,n){if(0!==t||0!==e||i!==this.width||n!==this.height){var r,o=this.__closestGroupOrSvg();r=this.__createElement("rect",{x:t,y:e,width:i,height:n,fill:"#FFFFFF"},!0),o.appendChild(r)}else this.__clearCanvas()},r.prototype.createLinearGradient=function(t,e,n,r){var s=this.__createElement("linearGradient",{id:i(this.__ids),x1:t+"px",x2:n+"px",y1:e+"px",y2:r+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__defs.appendChild(s),new o(s,this)},r.prototype.createRadialGradient=function(t,e,n,r,s,a){var l=this.__createElement("radialGradient",{id:i(this.__ids),cx:r+"px",cy:s+"px",r:a+"px",fx:t+"px",fy:e+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__defs.appendChild(l),new o(l,this)},r.prototype.__parseFont=function(){var t=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-,\'\"\sa-z0-9]+?)\s*$/i.exec(this.font),e={style:t[1]||"normal",size:t[4]||"10px",family:t[6]||"sans-serif",weight:t[3]||"normal",decoration:t[2]||"normal",href:null};return"underline"===this.__fontUnderline&&(e.decoration="underline"),this.__fontHref&&(e.href=this.__fontHref),e},r.prototype.__wrapTextLink=function(t,e){if(t.href){var i=this.__createElement("a");return i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),i.appendChild(e),i}return e},r.prototype.__applyText=function(t,e,i,n){var r=this.__parseFont(),o=this.__closestGroupOrSvg(),s=this.__createElement("text",{"font-family":r.family,"font-size":r.size,"font-style":r.style,"font-weight":r.weight,"text-decoration":r.decoration,x:e,y:i,"text-anchor":function(t){var e={left:"start",right:"end",center:"middle",start:"start",end:"end"};return e[t]||e.start}(this.textAlign),"dominant-baseline":function(t){var e={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return e[t]||e.alphabetic}(this.textBaseline)},!0);s.appendChild(this.__document.createTextNode(t)),this.__currentElement=s,this.__applyStyleToCurrentElement(n),o.appendChild(this.__wrapTextLink(r,s))},r.prototype.fillText=function(t,e,i){this.__applyText(t,e,i,"fill")},r.prototype.strokeText=function(t,e,i){this.__applyText(t,e,i,"stroke")},r.prototype.measureText=function(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)},r.prototype.arc=function(e,i,n,r,o,s){if(r!==o){r%=2*Math.PI,o%=2*Math.PI,r===o&&(o=(o+2*Math.PI-.001*(s?-1:1))%(2*Math.PI));var a=e+n*Math.cos(o),l=i+n*Math.sin(o),h=e+n*Math.cos(r),c=i+n*Math.sin(r),u=s?0:1,_=0,p=o-r;p<0&&(p+=2*Math.PI),_=s?p>Math.PI?0:1:p>Math.PI?1:0,this.lineTo(h,c),this.__addPathCommand(t("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:n,ry:n,xAxisRotation:0,largeArcFlag:_,sweepFlag:u,endX:a,endY:l})),this.__currentPosition={x:a,y:l}}},r.prototype.clip=function(){var e=this.__closestGroupOrSvg(),n=this.__createElement("clipPath"),r=i(this.__ids),o=this.__createElement("g");this.__applyCurrentDefaultPath(),e.removeChild(this.__currentElement),n.setAttribute("id",r),n.appendChild(this.__currentElement),this.__defs.appendChild(n),e.setAttribute("clip-path",t("url(#{id})",{id:r})),e.appendChild(o),this.__currentElement=o},r.prototype.drawImage=function(){var t,e,i,n,o,s,a,l,h,c,u,_,p,d,f=Array.prototype.slice.call(arguments),v=f[0],m=0,g=0;if(3===f.length)t=f[1],e=f[2],o=v.width,s=v.height,i=o,n=s;else if(5===f.length)t=f[1],e=f[2],i=f[3],n=f[4],o=v.width,s=v.height;else{if(9!==f.length)throw new Error("Inavlid number of arguments passed to drawImage: "+arguments.length);m=f[1],g=f[2],o=f[3],s=f[4],t=f[5],e=f[6],i=f[7],n=f[8]}a=this.__closestGroupOrSvg(),this.__currentElement;var y="translate("+t+", "+e+")";if(v instanceof r){if((l=v.getSvg().cloneNode(!0)).childNodes&&l.childNodes.length>1){for(h=l.childNodes[0];h.childNodes.length;)d=h.childNodes[0].getAttribute("id"),this.__ids[d]=d,this.__defs.appendChild(h.childNodes[0]);if(c=l.childNodes[1]){var b,x=c.getAttribute("transform");b=x?x+" "+y:y,c.setAttribute("transform",b),a.appendChild(c)}}}else"IMG"===v.nodeName?((u=this.__createElement("image")).setAttribute("width",i),u.setAttribute("height",n),u.setAttribute("preserveAspectRatio","none"),(m||g||o!==v.width||s!==v.height)&&((_=this.__document.createElement("canvas")).width=i,_.height=n,(p=_.getContext("2d")).drawImage(v,m,g,o,s,0,0,i,n),v=_),u.setAttribute("transform",y),u.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href","CANVAS"===v.nodeName?v.toDataURL():v.getAttribute("src")),a.appendChild(u)):"CANVAS"===v.nodeName&&((u=this.__createElement("image")).setAttribute("width",i),u.setAttribute("height",n),u.setAttribute("preserveAspectRatio","none"),(_=this.__document.createElement("canvas")).width=i,_.height=n,(p=_.getContext("2d")).imageSmoothingEnabled=!1,p.mozImageSmoothingEnabled=!1,p.oImageSmoothingEnabled=!1,p.webkitImageSmoothingEnabled=!1,p.drawImage(v,m,g,o,s,0,0,i,n),v=_,u.setAttribute("transform",y),u.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",v.toDataURL()),a.appendChild(u))},r.prototype.createPattern=function(t,e){var n,o=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),a=i(this.__ids);return o.setAttribute("id",a),o.setAttribute("width",t.width),o.setAttribute("height",t.height),"CANVAS"===t.nodeName||"IMG"===t.nodeName?((n=this.__document.createElementNS("http://www.w3.org/2000/svg","image")).setAttribute("width",t.width),n.setAttribute("height",t.height),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href","CANVAS"===t.nodeName?t.toDataURL():t.getAttribute("src")),o.appendChild(n),this.__defs.appendChild(o)):t instanceof r&&(o.appendChild(t.__root.childNodes[1]),this.__defs.appendChild(o)),new s(o,this)},r.prototype.setLineDash=function(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null},r.prototype.drawFocusRing=function(){},r.prototype.createImageData=function(){},r.prototype.getImageData=function(){},r.prototype.putImageData=function(){},r.prototype.globalCompositeOperation=function(){},r.prototype.setTransform=function(){},"object"==typeof window&&(window.C2S=r),"object"==typeof e&&"object"==typeof e.exports&&(e.exports=r)}()},function(t,e,i){var n,r=t(288),o=t(298),s=t(302),a=t(297),l=t(302),h=t(304),c=Function.prototype.bind,u=Object.defineProperty,_=Object.prototype.hasOwnProperty;n=function(t,e,i){var n,o=h(e)&&l(e.value);return n=r(e),delete n.writable,delete n.value,n.get=function(){return!i.overwriteDefinition&&_.call(this,t)?o:(e.value=c.call(o,i.resolveContext?i.resolveContext(this):this),u(this,t,e),this[t])},n},e.exports=function(t){var e=o(arguments[1]);return null!=e.resolveContext&&s(e.resolveContext),a(t,function(t,i){return n(i,t,e)})}},function(t,e,i){var n=t(285),r=t(298),o=t(291),s=t(305);(e.exports=function(t,e){var i,o,a,l,h;return arguments.length<2||"string"!=typeof t?(l=e,e=t,t=null):l=arguments[2],null==t?(i=a=!0,o=!1):(i=s.call(t,"c"),o=s.call(t,"e"),a=s.call(t,"w")),h={value:e,configurable:i,enumerable:o,writable:a},l?n(r(l),h):h}).gs=function(t,e,i){var a,l,h,c;return"string"!=typeof t?(h=i,i=e,e=t,t=null):h=arguments[3],null==e?e=void 0:o(e)?null==i?i=void 0:o(i)||(h=i,i=void 0):(h=e,e=i=void 0),null==t?(a=!0,l=!1):(a=s.call(t,"c"),l=s.call(t,"e")),c={get:e,set:i,configurable:a,enumerable:l},h?n(r(h),c):c}},function(t,e,i){var n=t(304);e.exports=function(){return n(this).length=0,this}},function(t,e,i){var n=t(279),r=t(283),o=t(304),s=Array.prototype.indexOf,a=Object.prototype.hasOwnProperty,l=Math.abs,h=Math.floor;e.exports=function(t){var e,i,c,u;if(!n(t))return s.apply(this,arguments);for(i=r(o(this).length),c=arguments[1],c=isNaN(c)?0:c>=0?h(c):r(this.length)-h(l(c)),e=c;e=55296&&g<=56319&&(w+=t[++i]),w=k?_.call(k,S,w,f):w,e?(p.value=w,d(v,f,p)):v[f]=w,++f;m=f}if(void 0===m)for(m=s(t.length),e&&(v=new e(m)),i=0;i0?1:-1}},function(t,e,i){e.exports=t(280)()?Number.isNaN:t(281)},function(t,e,i){e.exports=function(){var t=Number.isNaN;return"function"==typeof t&&(!t({})&&t(NaN)&&!t(34))}},function(t,e,i){e.exports=function(t){return t!=t}},function(t,e,i){var n=t(276),r=Math.abs,o=Math.floor;e.exports=function(t){return isNaN(t)?0:0!==(t=Number(t))&&isFinite(t)?n(t)*o(r(t)):t}},function(t,e,i){var n=t(282),r=Math.max;e.exports=function(t){return r(0,n(t))}},function(t,e,i){var n=t(302),r=t(304),o=Function.prototype.bind,s=Function.prototype.call,a=Object.keys,l=Object.prototype.propertyIsEnumerable;e.exports=function(t,e){return function(i,h){var c,u=arguments[2],_=arguments[3];return i=Object(r(i)),n(h),c=a(i),_&&c.sort("function"==typeof _?o.call(_,i):void 0),"function"!=typeof t&&(t=c[t]),s.call(t,c,function(t,n){return l.call(i,t)?s.call(h,u,i[t],t,i,n):e})}}},function(t,e,i){e.exports=t(286)()?Object.assign:t(287)},function(t,e,i){e.exports=function(){var t,e=Object.assign;return"function"==typeof e&&(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},function(t,e,i){var n=t(294),r=t(304),o=Math.max;e.exports=function(t,e){var i,s,a,l=o(arguments.length,2);for(t=Object(r(t)),a=function(n){try{t[n]=e[n]}catch(t){i||(i=t)}},s=1;s-1}},function(t,e,i){var n=Object.prototype.toString,r=n.call("");e.exports=function(t){return"string"==typeof t||t&&"object"==typeof t&&(t instanceof String||n.call(t)===r)||!1}},function(t,e,i){var n=Object.create(null),r=Math.random;e.exports=function(){var t;do{t=r().toString(36).slice(2)}while(n[t]);return t}},function(t,e,i){var n,r=t(299),o=t(305),s=t(266),a=t(323),l=t(313),h=Object.defineProperty;n=e.exports=function(t,e){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");l.call(this,t),e=e?o.call(e,"key+value")?"key+value":o.call(e,"key")?"key":"value":"value",h(this,"__kind__",s("",e))},r&&r(n,l),delete n.prototype.constructor,n.prototype=Object.create(l.prototype,{_resolve:s(function(t){return"value"===this.__kind__?this.__list__[t]:"key+value"===this.__kind__?[t,this.__list__[t]]:t})}),h(n.prototype,a.toStringTag,s("c","Array Iterator"))},function(t,e,i){var n=t(272),r=t(302),o=t(308),s=t(312),a=Array.isArray,l=Function.prototype.call,h=Array.prototype.some;e.exports=function(t,e){var i,c,u,_,p,d,f,v,m=arguments[2];if(a(t)||n(t)?i="array":o(t)?i="string":t=s(t),r(e),u=function(){_=!0},"array"!==i)if("string"!==i)for(c=t.next();!c.done;){if(l.call(e,m,c.value,u),_)return;c=t.next()}else for(d=t.length,p=0;p=55296&&v<=56319&&(f+=t[++p]),l.call(e,m,f,u),!_);++p);else h.call(t,function(t){return l.call(e,m,t,u),_})}},function(t,e,i){var n=t(272),r=t(308),o=t(310),s=t(315),a=t(316),l=t(323).iterator;e.exports=function(t){return"function"==typeof a(t)[l]?t[l]():n(t)?new o(t):r(t)?new s(t):new o(t)}},function(t,e,i){var n,r=t(267),o=t(285),s=t(302),a=t(304),l=t(266),h=t(265),c=t(323),u=Object.defineProperty,_=Object.defineProperties;e.exports=n=function(t,e){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");_(this,{__list__:l("w",a(t)),__context__:l("w",e),__nextIndex__:l("w",0)}),e&&(s(e.on),e.on("_add",this._onAdd),e.on("_delete",this._onDelete),e.on("_clear",this._onClear))},delete n.prototype.constructor,_(n.prototype,o({_next:l(function(){var t;if(this.__list__)return this.__redo__&&void 0!==(t=this.__redo__.shift())?t:this.__nextIndex__=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach(function(e,i){e>=t&&(this.__redo__[i]=++e)},this),this.__redo__.push(t)):u(this,"__redo__",l("c",[t])))}),_onDelete:l(function(t){var e;t>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(e=this.__redo__.indexOf(t))&&this.__redo__.splice(e,1),this.__redo__.forEach(function(e,i){e>t&&(this.__redo__[i]=--e)},this)))}),_onClear:l(function(){this.__redo__&&r.call(this.__redo__),this.__nextIndex__=0})}))),u(n.prototype,c.iterator,l(function(){return this}))},function(t,e,i){var n=t(272),r=t(293),o=t(308),s=t(323).iterator,a=Array.isArray;e.exports=function(t){return!!r(t)&&(!!a(t)||(!!o(t)||(!!n(t)||"function"==typeof t[s])))}},function(t,e,i){var n,r=t(299),o=t(266),s=t(323),a=t(313),l=Object.defineProperty;n=e.exports=function(t){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");t=String(t),a.call(this,t),l(this,"__length__",o("",t.length))},r&&r(n,a),delete n.prototype.constructor,n.prototype=Object.create(a.prototype,{_next:o(function(){if(this.__list__)return this.__nextIndex__=55296&&e<=56319?i+this.__list__[this.__nextIndex__++]:i})}),l(n.prototype,s.toStringTag,o("c","String Iterator"))},function(t,e,i){var n=t(314);e.exports=function(t){if(!n(t))throw new TypeError(t+" is not iterable");return t}},/*! + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE + * @version 3.0.2 + */ +function(t,e,i){(function(){"use strict";function i(t){return"function"==typeof t}function n(){return function(){setTimeout(r,1)}}function r(){for(var t=0;t\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=t.console&&(t.console.warn||t.console.log);return o&&o.call(t.console,r,n),e.apply(this,arguments)}}function h(t,e,i){var n,r=e.prototype;(n=t.prototype=Object.create(r)).constructor=t,n._super=r,i&&K(n,i)}function c(t,e){return function(){return t.apply(e,arguments)}}function u(t,e){return typeof t==et?t.apply(e?e[0]||r:r,e):t}function _(t,e){return t===r?e:t}function p(t,e,i){a(m(e),function(e){t.addEventListener(e,i,!1)})}function d(t,e,i){a(m(e),function(e){t.removeEventListener(e,i,!1)})}function f(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function v(t,e){return t.indexOf(e)>-1}function m(t){return t.trim().split(/\s+/g)}function g(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;ni[e]}):n.sort()),n}function x(t,e){for(var i,n,o=e[0].toUpperCase()+e.slice(1),s=0;s1&&!i.firstMultiple?i.firstMultiple=C(e):1===o&&(i.firstMultiple=!1);var s=i.firstInput,a=i.firstMultiple,l=a?a.center:s.center,h=e.center=T(n);e.timeStamp=rt(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=O(l,h),e.distance=M(l,h),function(t,e){var i=e.center,n=t.offsetDelta||{},r=t.prevDelta||{},o=t.prevInput||{};e.eventType!==_t&&o.eventType!==dt||(r=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},n=t.offsetDelta={x:i.x,y:i.y});e.deltaX=r.x+(i.x-n.x),e.deltaY=r.y+(i.y-n.y)}(i,e),e.offsetDirection=E(e.deltaX,e.deltaY);var c=A(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=c.x,e.overallVelocityY=c.y,e.overallVelocity=nt(c.x)>nt(c.y)?c.x:c.y,e.scale=a?function(t,e){return M(e[0],e[1],Ct)/M(t[0],t[1],Ct)}(a.pointers,n):1,e.rotation=a?function(t,e){return O(e[1],e[0],Ct)+O(t[1],t[0],Ct)}(a.pointers,n):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,n,o,s,a=t.lastInterval||e,l=e.timeStamp-a.timeStamp;if(e.eventType!=ft&&(l>ut||a.velocity===r)){var h=e.deltaX-a.deltaX,c=e.deltaY-a.deltaY,u=A(l,h,c);n=u.x,o=u.y,i=nt(u.x)>nt(u.y)?u.x:u.y,s=E(h,c),t.lastInterval=e}else i=a.velocity,n=a.velocityX,o=a.velocityY,s=a.direction;e.velocity=i,e.velocityX=n,e.velocityY=o,e.direction=s}(i,e);var u=t.element;f(e.srcEvent.target,u)&&(u=e.srcEvent.target);e.target=u}(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function C(t){for(var e=[],i=0;i=nt(e)?t<0?mt:gt:e<0?yt:bt}function M(t,e,i){i||(i=St);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return Math.sqrt(n*n+r*r)}function O(t,e,i){i||(i=St);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return 180*Math.atan2(r,n)/Math.PI}function z(){this.evEl=At,this.evWin=Et,this.pressed=!1,k.apply(this,arguments)}function P(){this.evEl=zt,this.evWin=Pt,k.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function j(){this.evTarget=Nt,this.evWin=Ft,this.started=!1,k.apply(this,arguments)}function N(){this.evTarget=It,this.targetIds={},k.apply(this,arguments)}function F(){k.apply(this,arguments);var t=c(this.handler,this);this.touch=new N(this.manager,t),this.mouse=new z(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function D(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var i={x:e.clientX,y:e.clientY};this.lastTouches.push(i);var n=this.lastTouches,r=function(){var t=n.indexOf(i);t>-1&&n.splice(t,1)};setTimeout(r,Bt)}}function I(t,e){this.manager=t,this.set(e)}function B(t){this.options=K({},this.defaults,t||{}),this.id=at++,this.manager=null,this.options.enable=_(this.options.enable,!0),this.state=Ht,this.simultaneous={},this.requireFail=[]}function R(t){return t&Zt?"cancel":t&$t?"end":t&Qt?"move":t&Jt?"start":""}function L(t){return t==bt?"down":t==yt?"up":t==mt?"left":t==gt?"right":""}function V(t,e){var i=e.manager;return i?i.get(t):t}function G(){B.apply(this,arguments)}function U(){G.apply(this,arguments),this.pX=null,this.pY=null}function Y(){G.apply(this,arguments)}function q(){B.apply(this,arguments),this._timer=null,this._input=null}function X(){G.apply(this,arguments)}function W(){G.apply(this,arguments)}function H(){B.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function J(t,e){return e=e||{},e.recognizers=_(e.recognizers,J.defaults.preset),new Q(t,e)}function Q(t,e){this.options=K({},J.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=function(t){var e,i=t.options.inputClass;e=i||(ht?P:ct?N:lt?F:z);return new e(t,S)}(this),this.touchAction=new I(this,this.options.touchAction),$(this,!0),a(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}function $(t,e){var i=t.element;if(i.style){var n;a(t.options.cssProps,function(r,o){n=x(i.style,o),e?(t.oldCssProps[n]=i.style[n],i.style[n]=r):i.style[n]=t.oldCssProps[n]||""}),e||(t.oldCssProps={})}}var K,Z=["","webkit","Moz","MS","ms","o"],tt=i.createElement("div"),et="function",it=Math.round,nt=Math.abs,rt=Date.now;K="function"!=typeof Object.assign?function(t){if(t===r||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){i.manager.emit(e,t)}var i=this,n=this.state;n<$t&&e(i.options.event+R(n)),e(i.options.event),t.additionalEvent&&e(t.additionalEvent),n>=$t&&e(i.options.event+R(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;te.threshold&&r&e.direction},attrTest:function(t){return G.prototype.attrTest.call(this,t)&&(this.state&Jt||!(this.state&Jt)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=L(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),h(Y,G,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Yt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&Jt)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),h(q,B,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Gt]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distancee.time;if(this._input=t,!n||!i||t.eventType&(dt|ft)&&!r)this.reset();else if(t.eventType&_t)this.reset(),this._timer=o(function(){this.state=Kt,this.tryEmit()},e.time,this);else if(t.eventType&dt)return Kt;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===Kt&&(t&&t.eventType&dt?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=rt(),this.manager.emit(this.options.event,this._input)))}}),h(X,G,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Yt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&Jt)}}),h(W,G,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:xt|wt,pointers:1},getTouchAction:function(){return U.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(xt|wt)?e=t.overallVelocity:i&xt?e=t.overallVelocityX:i&wt&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&nt(e)>this.options.velocity&&t.eventType&dt},emit:function(t){var e=L(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),h(H,B,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Ut]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distance=";case n.Eq:return"=="}}()+" 0"},Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"expression",{get:function(){return this._expression},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"op",{get:function(){return this._operator},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"strength",{get:function(){return this._strength},enumerable:!0,configurable:!0}),t}();i.Constraint=o;var s=0},function(t,e,i){var n=t(343),r=t(346),o=t(337),s=function(){function t(){var t=function(t){for(var e=0,i=function(){return 0},n=o.createMap(r.Variable.Compare),s=0,a=t.length;s=0?" + "+l+a:" - "+-l+a}var h=this.constant;return h<0?i+=" - "+-h:h>0&&(i+=" + "+h),i},Object.defineProperty(t.prototype,"terms",{get:function(){return this._terms},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"constant",{get:function(){return this._constant},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){var t=this._constant;return n.forEach(this._terms,function(e){t+=e.first.value*e.second}),t},enumerable:!0,configurable:!0}),t}();i.Expression=s},function(t,e,i){/*----------------------------------------------------------------------------- +| Copyright (c) 2014, Nucleic Development Team. +| +| Distributed under the terms of the Modified BSD License. +| +| The full license is in the file COPYING.txt, distributed with this software. +|----------------------------------------------------------------------------*/ +function n(t){for(var e in t)i.hasOwnProperty(e)||(i[e]=t[e])}n(t(346)),n(t(335)),n(t(334)),n(t(339)),n(t(338))},function(t,e,i){var n=t(343);i.createMap=function(t){return new n.AssociativeArray(t)}},function(t,e,i){function n(t){return t<0?-t<1e-8:t<1e-8}var r=t(346),o=t(335),s=t(334),a=t(339),l=t(337),h=t(343),c=function(){function t(){this._cnMap=l.createMap(s.Constraint.Compare),this._rowMap=l.createMap(_.Compare),this._varMap=l.createMap(r.Variable.Compare),this._editMap=l.createMap(r.Variable.Compare),this._infeasibleRows=[],this._objective=new d,this._artificial=null,this._idTick=0}return t.prototype.addConstraint=function(t){var e=this._cnMap.find(t);if(void 0!==e)throw new Error("duplicate constraint");var i=this._createRow(t),r=i.row,o=i.tag,s=this._chooseSubject(r,o);if(s.type()===u.Invalid&&r.allDummies()){if(!n(r.constant())){for(var a=[],l=0,h=t.expression.terms._array;l0&&a.type()!==u.Dummy){var h=this._objective.coefficientFor(a),c=h/l;c0;)i(t[r=o+(n=s>>1)],e)<0?(o=r+1,s-=n+1):s=n;return o}var r=t(344);i.lowerBound=n,i.binarySearch=function(t,e,i){var r=n(t,e,i);if(r===t.length)return-1;var o=t[r];if(0!==i(o,e))return-1;return r},i.binaryFind=function(t,e,i){var r=n(t,e,i);if(r===t.length)return;var o=t[r];if(0!==i(o,e))return;return o},i.asSet=function(t,e){var i=r.asArray(t),n=i.length;if(n<=1)return i;i.sort(e);for(var o=[i[0]],s=1,a=0;s0))return!1;++r}}return!0},i.setIsSubset=function(t,e,i){var n=t.length,r=e.length;if(n>r)return!1;var o=0,s=0;for(;o0?++s:(++o,++s)}if(o0?(a.push(h),++r):(a.push(l),++n,++r)}for(;n0?++r:(a.push(l),++n,++r)}return a},i.setDifference=function(t,e,i){var n=0,r=0,o=t.length,s=e.length,a=[];for(;n0?++r:(++n,++r)}for(;n0?(a.push(h),++r):(++n,++r)}for(;n=0},e.prototype.find=function(t){return s.binaryFind(this._array,t,this._wrapped)},e.prototype.setDefault=function(t,e){var i=this._array,n=s.lowerBound(i,t,this._wrapped);if(n===i.length){var o=new r.Pair(t,e());return i.push(o),o}var a=i[n];if(0!==this._compare(a.first,t)){var o=new r.Pair(t,e());return i.splice(n,0,o),o}return a},e.prototype.insert=function(t,e){var i=this._array,n=s.lowerBound(i,t,this._wrapped);if(n===i.length){var o=new r.Pair(t,e);return i.push(o),o}var a=i[n];if(0!==this._compare(a.first,t)){var o=new r.Pair(t,e);return i.splice(n,0,o),o}return a.second=e,a},e.prototype.update=function(t){var i=this;t instanceof e?this._array=function(t,e,i){var n=0,r=0,o=t.length,s=e.length,a=[];for(;n0?(a.push(h.copy()),++r):(a.push(h.copy()),++n,++r)}for(;n-1?function(t,e){var i,n,o,s,a;a=t.toString(),i=a.split("e")[0],s=a.split("e")[1],n=i.split(".")[0],o=i.split(".")[1]||"",a=n+o+r(s-o.length),e>0&&(a+="."+r(e));return a}(t,e):(i(t*a)/a).toFixed(e),n&&(o=new RegExp("0{1,"+n+"}$"),s=s.replace(o,"")),s}function s(t,e,i){return e.indexOf("$")>-1?function(t,e,i){var n,r,o=e,s=o.indexOf("$"),l=o.indexOf("("),h=o.indexOf("+"),c=o.indexOf("-"),_="",d="";-1===o.indexOf("$")?"infix"===u[p].currency.position?(d=u[p].currency.symbol,u[p].currency.spaceSeparated&&(d=" "+d+" ")):u[p].currency.spaceSeparated&&(_=" "):o.indexOf(" $")>-1?(_=" ",o=o.replace(" $","")):o.indexOf("$ ")>-1?(_=" ",o=o.replace("$ ","")):o=o.replace("$","");if(r=a(t,o,i,d),-1===e.indexOf("$"))switch(u[p].currency.position){case"postfix":r.indexOf(")")>-1?((r=r.split("")).splice(-1,0,_+u[p].currency.symbol),r=r.join("")):r=r+_+u[p].currency.symbol;break;case"infix":break;case"prefix":r.indexOf("(")>-1||r.indexOf("-")>-1?(r=r.split(""),n=Math.max(l,c)+1,r.splice(n,0,u[p].currency.symbol+_),r=r.join("")):r=u[p].currency.symbol+_+r;break;default:throw Error('Currency position should be among ["prefix", "infix", "postfix"]')}else s<=1?r.indexOf("(")>-1||r.indexOf("+")>-1||r.indexOf("-")>-1?(r=r.split(""),n=1,(s-1?((r=r.split("")).splice(-1,0,_+u[p].currency.symbol),r=r.join("")):r=r+_+u[p].currency.symbol;return r}(t,e,i):e.indexOf("%")>-1?function(t,e,i){var n,r="";t*=100,e.indexOf(" %")>-1?(r=" ",e=e.replace(" %","")):e=e.replace("%","");(n=a(t,e,i)).indexOf(")")>-1?((n=n.split("")).splice(-1,0,r+"%"),n=n.join("")):n=n+r+"%";return n}(t,e,i):e.indexOf(":")>-1?function(t){var e=Math.floor(t/60/60),i=Math.floor((t-60*e*60)/60),n=Math.round(t-60*e*60-60*i);return e+":"+(i<10?"0"+i:i)+":"+(n<10?"0"+n:n)}(t):a(t,e,i)}function a(t,e,i,n){var r,s,a,l,h,c,_,f,v,m,g,y,b,x,w,k,S,C,T=!1,A=!1,E=!1,M="",O=!1,z=!1,P=!1,j=!1,N=!1,F="",D="",I=Math.abs(t),B=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],R=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],L="",V=!1,G=!1,U="";if(0===t&&null!==d)return d;if(!isFinite(t))return""+t;if(0===e.indexOf("{")){var Y=e.indexOf("}");if(-1===Y)throw Error('Format should also contain a "}"');y=e.slice(1,Y),e=e.slice(Y+1)}else y="";if(e.indexOf("}")===e.length-1){var q=e.indexOf("{");if(-1===q)throw Error('Format should also contain a "{"');b=e.slice(q+1,-1),e=e.slice(0,q+1)}else b="";var X;if(X=-1===e.indexOf(".")?e.match(/([0-9]+).*/):e.match(/([0-9]+)\..*/),C=null===X?-1:X[1].length,-1!==e.indexOf("-")&&(V=!0),e.indexOf("(")>-1?(T=!0,e=e.slice(1,-1)):e.indexOf("+")>-1&&(A=!0,e=e.replace(/\+/g,"")),e.indexOf("a")>-1){if(m=e.split(".")[0].match(/[0-9]+/g)||["0"],m=parseInt(m[0],10),O=e.indexOf("aK")>=0,z=e.indexOf("aM")>=0,P=e.indexOf("aB")>=0,j=e.indexOf("aT")>=0,N=O||z||P||j,e.indexOf(" a")>-1?(M=" ",e=e.replace(" a","")):e=e.replace("a",""),h=Math.floor(Math.log(I)/Math.LN10)+1,_=h%3,_=0===_?3:_,m&&0!==I&&(c=Math.floor(Math.log(I)/Math.LN10)+1-m,f=3*~~((Math.min(m,h)-_)/3),I/=Math.pow(10,f),-1===e.indexOf(".")&&m>3))for(e+="[.]",k=(k=0===c?0:3*~~(c/3)-c)<0?k+3:k,r=0;r=Math.pow(10,12)&&!N||j?(M+=u[p].abbreviations.trillion,t/=Math.pow(10,12)):I=Math.pow(10,9)&&!N||P?(M+=u[p].abbreviations.billion,t/=Math.pow(10,9)):I=Math.pow(10,6)&&!N||z?(M+=u[p].abbreviations.million,t/=Math.pow(10,6)):(I=Math.pow(10,3)&&!N||O)&&(M+=u[p].abbreviations.thousand,t/=Math.pow(10,3)))}if(e.indexOf("b")>-1)for(e.indexOf(" b")>-1?(F=" ",e=e.replace(" b","")):e=e.replace("b",""),l=0;l<=B.length;l++)if(s=Math.pow(1024,l),a=Math.pow(1024,l+1),t>=s&&t0&&(t/=s);break}if(e.indexOf("d")>-1)for(e.indexOf(" d")>-1?(F=" ",e=e.replace(" d","")):e=e.replace("d",""),l=0;l<=R.length;l++)if(s=Math.pow(1e3,l),a=Math.pow(1e3,l+1),t>=s&&t0&&(t/=s);break}if(e.indexOf("o")>-1&&(e.indexOf(" o")>-1?(D=" ",e=e.replace(" o","")):e=e.replace("o",""),u[p].ordinal&&(D+=u[p].ordinal(t))),e.indexOf("[.]")>-1&&(E=!0,e=e.replace("[.]",".")),v=t.toString().split(".")[0],g=e.split(".")[1],x=e.indexOf(","),g){if(-1!==g.indexOf("*")?L=o(t,t.toString().split(".")[1].length,i):g.indexOf("[")>-1?(g=(g=g.replace("]","")).split("["),L=o(t,g[0].length+g[1].length,i,g[1].length)):L=o(t,g.length,i),v=L.split(".")[0],L.split(".")[1].length){var W=n?M+n:u[p].delimiters.decimal;L=W+L.split(".")[1]}else L="";E&&0===Number(L.slice(1))&&(L="")}else v=o(t,null,i);return v.indexOf("-")>-1&&(v=v.slice(1),G=!0),v.length-1&&(v=v.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+u[p].delimiters.thousands)),0===e.indexOf(".")&&(v=""),w=e.indexOf("("),S=e.indexOf("-"),U=w2||(o.length<2?!o[0].match(/^\d+.*\d$/)||o[0].match(a):1===o[0].length?!o[0].match(/^\d+$/)||o[0].match(a)||!o[1].match(/^\d+$/):!o[0].match(/^\d+.*\d$/)||o[0].match(a)||!o[1].match(/^\d+$/)))))},e.exports={format:function(t,e,i,n){null!=i&&i!==c.culture()&&c.setCulture(i);return s(Number(t),null!=e?e:f,null==n?Math.round:n)}}},function(t,e,i){function n(t,e){if(!(this instanceof n))return new n(t);e=e||function(t){if(t)throw t};var i=r(t);if("object"==typeof i){var s=n.projections.get(i.projName);if(s){if(i.datumCode&&"none"!==i.datumCode){var c=l[i.datumCode];c&&(i.datum_params=c.towgs84?c.towgs84.split(","):null,i.ellps=c.ellipse,i.datumName=c.datumName?c.datumName:i.datumCode)}i.k0=i.k0||1,i.axis=i.axis||"enu";var u=a.sphere(i.a,i.b,i.rf,i.ellps,i.sphere),_=a.eccentricity(u.a,u.b,u.rf,i.R_A),p=i.datum||h(i.datumCode,i.datum_params,u.a,u.b,_.es,_.ep2);o(this,i),o(this,s),this.a=u.a,this.b=u.b,this.rf=u.rf,this.sphere=u.sphere,this.es=_.es,this.e=_.e,this.ep2=_.ep2,this.datum=p,this.init(),e(null,this)}else e(t)}else e(t)}var r=t(368),o=t(366),s=t(370),a=t(365),l=t(356),h=t(361);(n.projections=s).start(),e.exports=n},function(t,e,i){e.exports=function(t,e,i){var n,r,o,s=i.x,a=i.y,l=i.z||0,h={};for(o=0;o<3;o++)if(!e||2!==o||void 0!==i.z)switch(0===o?(n=s,r="x"):1===o?(n=a,r="y"):(n=l,r="z"),t.axis[o]){case"e":h[r]=n;break;case"w":h[r]=-n;break;case"n":h[r]=n;break;case"s":h[r]=-n;break;case"u":void 0!==i[r]&&(h.z=n);break;case"d":void 0!==i[r]&&(h.z=-n);break;default:return null}return h}},function(t,e,i){var n=2*Math.PI,r=t(353);e.exports=function(t){return Math.abs(t)<=3.14159265359?t:t-r(t)*n}},function(t,e,i){e.exports=function(t,e,i){var n=t*e;return i/Math.sqrt(1-n*n)}},function(t,e,i){var n=Math.PI/2;e.exports=function(t,e){for(var i,r,o=.5*t,s=n-2*Math.atan(e),a=0;a<=15;a++)if(i=t*Math.sin(s),r=n-2*Math.atan(e*Math.pow((1-i)/(1+i),o))-s,s+=r,Math.abs(r)<=1e-10)return s;return-9999}},function(t,e,i){e.exports=function(t){return t<0?-1:1}},function(t,e,i){e.exports=function(t){var e={x:t[0],y:t[1]};return t.length>2&&(e.z=t[2]),t.length>3&&(e.m=t[3]),e}},function(t,e,i){var n=Math.PI/2;e.exports=function(t,e,i){var r=t*i,o=.5*t;return r=Math.pow((1-r)/(1+r),o),Math.tan(.5*(n-e))/r}},function(t,e,i){i.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},i.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},i.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},i.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},i.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},i.potsdam={towgs84:"606.0,23.0,413.0",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},i.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},i.hermannskogel={towgs84:"653.0,-212.0,449.0",ellipse:"bessel",datumName:"Hermannskogel"},i.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},i.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},i.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},i.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},i.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},i.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},i.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},i.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"}},function(t,e,i){i.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"},i.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},i.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},i.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"},i.airy={a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},i.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},i.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},i.mod_airy={a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},i.andrae={a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},i.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},i.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},i.bessel={a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},i.bess_nam={a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},i.clrk66={a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},i.clrk80={a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},i.clrk58={a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},i.CPM={a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},i.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},i.engelis={a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},i.evrst30={a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},i.evrst48={a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},i.evrst56={a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},i.evrst69={a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},i.evrstSS={a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},i.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},i.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"},i.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"},i.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"},i.hough={a:6378270,rf:297,ellipseName:"Hough"},i.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},i.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"},i.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"},i.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"},i.new_intl={a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},i.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},i.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},i.SEasia={a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},i.walbeck={a:6376896,b:6355834.8467,ellipseName:"Walbeck"},i.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"},i.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"},i.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"},i.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"},i.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}},function(t,e,i){i.greenwich=0,i.lisbon=-9.131906111111,i.paris=2.337229166667,i.bogota=-74.080916666667,i.madrid=-3.687938888889,i.rome=12.452333333333,i.bern=7.439583333333,i.jakarta=106.807719444444,i.ferro=-17.666666666667,i.brussels=4.367975,i.stockholm=18.058277777778,i.athens=23.7163375,i.oslo=10.722916666667},function(t,e,i){i.ft={to_meter:.3048},i["us-ft"]={to_meter:1200/3937}},function(t,e,i){function n(t,e,i){var n;return Array.isArray(i)?(n=s(t,e,i),3===i.length?[n.x,n.y,n.z]:[n.x,n.y]):s(t,e,i)}function r(t){return t instanceof o?t:t.oProj?t.oProj:o(t)}var o=t(348),s=t(373),a=o("WGS84");e.exports=function(t,e,i){t=r(t);var o,s=!1;void 0===e?(e=t,t=a,s=!0):(void 0!==e.x||Array.isArray(e))&&(i=e,e=t,t=a,s=!0);return e=r(e),i?n(t,e,i):(o={forward:function(i){return n(t,e,i)},inverse:function(i){return n(e,t,i)}},s&&(o.oProj=e),o)}},function(t,e,i){var n=1,r=2,o=4,s=5,a=484813681109536e-20;e.exports=function(t,e,i,l,h,c){var u={};u.datum_type=o,t&&"none"===t&&(u.datum_type=s);e&&(u.datum_params=e.map(parseFloat),0===u.datum_params[0]&&0===u.datum_params[1]&&0===u.datum_params[2]||(u.datum_type=n),u.datum_params.length>3&&(0===u.datum_params[3]&&0===u.datum_params[4]&&0===u.datum_params[5]&&0===u.datum_params[6]||(u.datum_type=r,u.datum_params[3]*=a,u.datum_params[4]*=a,u.datum_params[5]*=a,u.datum_params[6]=u.datum_params[6]/1e6+1)));return u.a=i,u.b=l,u.es=h,u.ep2=c,u}},function(t,e,i){var n=Math.PI/2;i.compareDatums=function(t,e){return t.datum_type===e.datum_type&&(!(t.a!==e.a||Math.abs(this.es-e.es)>5e-11)&&(1===t.datum_type?this.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]:2!==t.datum_type||t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]&&t.datum_params[3]===e.datum_params[3]&&t.datum_params[4]===e.datum_params[4]&&t.datum_params[5]===e.datum_params[5]&&t.datum_params[6]===e.datum_params[6]))},i.geodeticToGeocentric=function(t,e,i){var r,o,s,a,l=t.x,h=t.y,c=t.z?t.z:0;if(h<-n&&h>-1.001*n)h=-n;else if(h>n&&h<1.001*n)h=n;else if(h<-n||h>n)return null;return l>Math.PI&&(l-=2*Math.PI),o=Math.sin(h),a=Math.cos(h),s=o*o,r=i/Math.sqrt(1-e*s),{x:(r+c)*a*Math.cos(l),y:(r+c)*a*Math.sin(l),z:(r*(1-e)+c)*o}},i.geocentricToGeodetic=function(t,e,i,r){var o,s,a,l,h,c,u,_,p,d,f,v,m,g,y,b,x=t.x,w=t.y,k=t.z?t.z:0;if(o=Math.sqrt(x*x+w*w),s=Math.sqrt(x*x+w*w+k*k),o/i<1e-12){if(g=0,s/i<1e-12)return y=n,b=-r,{x:t.x,y:t.y,z:t.z}}else g=Math.atan2(w,x);a=k/s,l=o/s,h=1/Math.sqrt(1-e*(2-e)*l*l),_=l*(1-e)*h,p=a*h,m=0;do{m++,u=i/Math.sqrt(1-e*p*p),c=e*u/(u+(b=o*_+k*p-u*(1-e*p*p))),h=1/Math.sqrt(1-c*(2-c)*l*l),v=(f=a*h)*_-(d=l*(1-c)*h)*p,_=d,p=f}while(v*v>1e-24&&m<30);return y=Math.atan(f/Math.abs(d)),{x:g,y:y,z:b}},i.geocentricToWgs84=function(t,e,i){if(1===e)return{x:t.x+i[0],y:t.y+i[1],z:t.z+i[2]};if(2===e){var n=i[0],r=i[1],o=i[2],s=i[3],a=i[4],l=i[5],h=i[6];return{x:h*(t.x-l*t.y+a*t.z)+n,y:h*(l*t.x+t.y-s*t.z)+r,z:h*(-a*t.x+s*t.y+t.z)+o}}},i.geocentricFromWgs84=function(t,e,i){if(1===e)return{x:t.x-i[0],y:t.y-i[1],z:t.z-i[2]};if(2===e){var n=i[0],r=i[1],o=i[2],s=i[3],a=i[4],l=i[5],h=i[6],c=(t.x-n)/h,u=(t.y-r)/h,_=(t.z-o)/h;return{x:c+l*u-a*_,y:-l*c+u+s*_,z:a*c-s*u+_}}}},function(t,e,i){function n(t){return t===r||t===o}var r=1,o=2,s=t(362);e.exports=function(t,e,i){return s.compareDatums(t,e)?i:5===t.datum_type||5===e.datum_type?i:t.es!==e.es||t.a!==e.a||n(t.datum_type)||n(e.datum_type)?(i=s.geodeticToGeocentric(i,t.es,t.a),n(t.datum_type)&&(i=s.geocentricToWgs84(i,t.datum_type,t.datum_params)),n(e.datum_type)&&(i=s.geocentricFromWgs84(i,e.datum_type,e.datum_params)),s.geocentricToGeodetic(i,e.es,e.a,e.b)):i}},function(t,e,i){function n(t){var e=this;if(2===arguments.length){var i=arguments[1];n[t]="string"==typeof i?"+"===i.charAt(0)?o(arguments[1]):s(arguments[1]):i}else if(1===arguments.length){if(Array.isArray(t))return t.map(function(t){Array.isArray(t)?n.apply(e,t):n(t)});if("string"==typeof t){if(t in n)return n[t]}else"EPSG"in t?n["EPSG:"+t.EPSG]=t:"ESRI"in t?n["ESRI:"+t.ESRI]=t:"IAU2000"in t?n["IAU2000:"+t.IAU2000]=t:console.log(t);return}}var r=t(367),o=t(369),s=t(374);r(n),e.exports=n},function(t,e,i){var n=t(357);i.eccentricity=function(t,e,i,n){var r=t*t,o=e*e,s=(r-o)/r,a=0;n?(r=(t*=1-s*(.16666666666666666+s*(.04722222222222222+.022156084656084655*s)))*t,s=0):a=Math.sqrt(s);var l=(r-o)/o;return{es:s,e:a,ep2:l}},i.sphere=function(t,e,i,r,o){if(!t){var s=n[r];s||(s=n.WGS84),t=s.a,e=s.b,i=s.rf}return i&&!e&&(e=(1-1/i)*t),(0===i||Math.abs(t-e)<1e-10)&&(o=!0,e=t),{a:t,b:e,rf:i,sphere:o}}},function(t,e,i){e.exports=function(t,e){t=t||{};var i,n;if(!e)return t;for(n in e)void 0!==(i=e[n])&&(t[n]=i);return t}},function(t,e,i){e.exports=function(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}},function(t,e,i){var n=t(364),r=t(374),o=t(369),s=["GEOGCS","GEOCCS","PROJCS","LOCAL_CS"];e.exports=function(t){if(!function(t){return"string"==typeof t}(t))return t;if(function(t){return t in n}(t))return n[t];if(function(t){return s.some(function(e){return t.indexOf(e)>-1})}(t))return r(t);if(function(t){return"+"===t[0]}(t))return o(t)}},function(t,e,i){var n=.017453292519943295,r=t(358),o=t(359);e.exports=function(t){var e,i,s,a={},l=t.split("+").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,e){var i=e.split("=");return i.push(!0),t[i[0].toLowerCase()]=i[1],t},{}),h={proj:"projName",datum:"datumCode",rf:function(t){a.rf=parseFloat(t)},lat_0:function(t){a.lat0=t*n},lat_1:function(t){a.lat1=t*n},lat_2:function(t){a.lat2=t*n},lat_ts:function(t){a.lat_ts=t*n},lon_0:function(t){a.long0=t*n},lon_1:function(t){a.long1=t*n},lon_2:function(t){a.long2=t*n},alpha:function(t){a.alpha=parseFloat(t)*n},lonc:function(t){a.longc=t*n},x_0:function(t){a.x0=parseFloat(t)},y_0:function(t){a.y0=parseFloat(t)},k_0:function(t){a.k0=parseFloat(t)},k:function(t){a.k0=parseFloat(t)},a:function(t){a.a=parseFloat(t)},b:function(t){a.b=parseFloat(t)},r_a:function(){a.R_A=!0},zone:function(t){a.zone=parseInt(t,10)},south:function(){a.utmSouth=!0},towgs84:function(t){a.datum_params=t.split(",").map(function(t){return parseFloat(t)})},to_meter:function(t){a.to_meter=parseFloat(t)},units:function(t){a.units=t,o[t]&&(a.to_meter=o[t].to_meter)},from_greenwich:function(t){a.from_greenwich=t*n},pm:function(t){a.from_greenwich=(r[t]?r[t]:parseFloat(t))*n},nadgrids:function(t){"@null"===t?a.datumCode="none":a.nadgrids=t},axis:function(t){3===t.length&&-1!=="ewnsud".indexOf(t.substr(0,1))&&-1!=="ewnsud".indexOf(t.substr(1,1))&&-1!=="ewnsud".indexOf(t.substr(2,1))&&(a.axis=t)}};for(e in l)i=l[e],e in h?"function"==typeof(s=h[e])?s(i):a[s]=i:a[e]=i;return"string"==typeof a.datumCode&&"WGS84"!==a.datumCode&&(a.datumCode=a.datumCode.toLowerCase()),a}},function(t,e,i){function n(t,e){var i=s.length;return t.names?(s[i]=t,t.names.forEach(function(t){o[t.toLowerCase()]=i}),this):(console.log(e),!0)}var r=[t(372),t(371)],o={},s=[];i.add=n,i.get=function(t){if(!t)return!1;var e=t.toLowerCase();return void 0!==o[e]&&s[o[e]]?s[o[e]]:void 0},i.start=function(){r.forEach(n)}},function(t,e,i){function n(t){return t}i.init=function(){},i.forward=n,i.inverse=n,i.names=["longlat","identity"]},function(t,e,i){var n=t(351),r=Math.PI/2,o=57.29577951308232,s=t(350),a=Math.PI/4,l=t(355),h=t(352);i.init=function(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=n(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},i.forward=function(t){var e=t.x,i=t.y;if(i*o>90&&i*o<-90&&e*o>180&&e*o<-180)return null;var n,h;if(Math.abs(Math.abs(i)-r)<=1e-10)return null;if(this.sphere)n=this.x0+this.a*this.k0*s(e-this.long0),h=this.y0+this.a*this.k0*Math.log(Math.tan(a+.5*i));else{var c=Math.sin(i),u=l(this.e,i,c);n=this.x0+this.a*this.k0*s(e-this.long0),h=this.y0-this.a*this.k0*Math.log(u)}return t.x=n,t.y=h,t},i.inverse=function(t){var e,i,n=t.x-this.x0,o=t.y-this.y0;if(this.sphere)i=r-2*Math.atan(Math.exp(-o/(this.a*this.k0)));else{var a=Math.exp(-o/(this.a*this.k0));if(-9999===(i=h(this.e,a)))return null}return e=s(this.long0+n/(this.a*this.k0)),t.x=e,t.y=i,t},i.names=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},function(t,e,i){var n=1,r=2,o=t(363),s=t(349),a=t(348),l=t(354);e.exports=function t(e,i,h){var c;return Array.isArray(h)&&(h=l(h)),e.datum&&i.datum&&function(t,e){return(t.datum.datum_type===n||t.datum.datum_type===r)&&"WGS84"!==e.datumCode||(e.datum.datum_type===n||e.datum.datum_type===r)&&"WGS84"!==t.datumCode}(e,i)&&(c=new a("WGS84"),h=t(e,c,h),e=c),"enu"!==e.axis&&(h=s(e,!1,h)),"longlat"===e.projName?h={x:.017453292519943295*h.x,y:.017453292519943295*h.y}:(e.to_meter&&(h={x:h.x*e.to_meter,y:h.y*e.to_meter}),h=e.inverse(h)),e.from_greenwich&&(h.x+=e.from_greenwich),h=o(e.datum,i.datum,h),i.from_greenwich&&(h={x:h.x-i.grom_greenwich,y:h.y}),"longlat"===i.projName?h={x:57.29577951308232*h.x,y:57.29577951308232*h.y}:(h=i.forward(h),i.to_meter&&(h={x:h.x/i.to_meter,y:h.y/i.to_meter})),"enu"!==i.axis?s(i,!0,h):h}},function(t,e,i){function n(t,e,i){t[e]=i.map(function(t){var e={};return r(t,e),e}).reduce(function(t,e){return a(t,e)},{})}function r(t,e){var i;Array.isArray(t)?("PARAMETER"===(i=t.shift())&&(i=t.shift()),1===t.length?Array.isArray(t[0])?(e[i]={},r(t[0],e[i])):e[i]=t[0]:t.length?"TOWGS84"===i?e[i]=t:(e[i]={},["UNIT","PRIMEM","VERT_DATUM"].indexOf(i)>-1?(e[i]={name:t[0].toLowerCase(),convert:t[1]},3===t.length&&(e[i].auth=t[2])):"SPHEROID"===i?(e[i]={name:t[0],a:t[1],rf:t[2]},4===t.length&&(e[i].auth=t[3])):["GEOGCS","GEOCCS","DATUM","VERT_CS","COMPD_CS","LOCAL_CS","FITTED_CS","LOCAL_DATUM"].indexOf(i)>-1?(t[0]=["name",t[0]],n(e,i,t)):t.every(function(t){return Array.isArray(t)})?n(e,i,t):r(t,e[i])):e[i]=!0):e[t]=!0}function o(t){return t*s}var s=.017453292519943295,a=t(366);e.exports=function(t,e){var i=JSON.parse((","+t).replace(/\s*\,\s*([A-Z_0-9]+?)(\[)/g,',["$1",').slice(1).replace(/\s*\,\s*([A-Z_0-9]+?)\]/g,',"$1"]').replace(/,\["VERTCS".+/,"")),n=i.shift(),s=i.shift();i.unshift(["name",s]),i.unshift(["type",n]),i.unshift("output");var l={};return r(i,l),function(t){function e(e){var i=t.to_meter||1;return parseFloat(e,10)*i}"GEOGCS"===t.type?t.projName="longlat":"LOCAL_CS"===t.type?(t.projName="identity",t.local=!0):"object"==typeof t.PROJECTION?t.projName=Object.keys(t.PROJECTION)[0]:t.projName=t.PROJECTION;t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),"metre"===t.units&&(t.units="meter"),t.UNIT.convert&&("GEOGCS"===t.type?t.DATUM&&t.DATUM.SPHEROID&&(t.to_meter=parseFloat(t.UNIT.convert,10)*t.DATUM.SPHEROID.a):t.to_meter=parseFloat(t.UNIT.convert,10)));t.GEOGCS&&(t.GEOGCS.DATUM?t.datumCode=t.GEOGCS.DATUM.name.toLowerCase():t.datumCode=t.GEOGCS.name.toLowerCase(),"d_"===t.datumCode.slice(0,2)&&(t.datumCode=t.datumCode.slice(2)),"new_zealand_geodetic_datum_1949"!==t.datumCode&&"new_zealand_1949"!==t.datumCode||(t.datumCode="nzgd49"),"wgs_1984"===t.datumCode&&("Mercator_Auxiliary_Sphere"===t.PROJECTION&&(t.sphere=!0),t.datumCode="wgs84"),"_ferro"===t.datumCode.slice(-6)&&(t.datumCode=t.datumCode.slice(0,-6)),"_jakarta"===t.datumCode.slice(-8)&&(t.datumCode=t.datumCode.slice(0,-8)),~t.datumCode.indexOf("belge")&&(t.datumCode="rnb72"),t.GEOGCS.DATUM&&t.GEOGCS.DATUM.SPHEROID&&(t.ellps=t.GEOGCS.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===t.ellps.toLowerCase().slice(0,13)&&(t.ellps="intl"),t.a=t.GEOGCS.DATUM.SPHEROID.a,t.rf=parseFloat(t.GEOGCS.DATUM.SPHEROID.rf,10)),~t.datumCode.indexOf("osgb_1936")&&(t.datumCode="osgb36"));t.b&&!isFinite(t.b)&&(t.b=t.a);[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_2","Standard_Parallel_2"],["false_easting","False_Easting"],["false_northing","False_Northing"],["central_meridian","Central_Meridian"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",o],["longitude_of_center","Longitude_Of_Center"],["longc","longitude_of_center",o],["x0","false_easting",e],["y0","false_northing",e],["long0","central_meridian",o],["lat0","latitude_of_origin",o],["lat0","standard_parallel_1",o],["lat1","standard_parallel_1",o],["lat2","standard_parallel_2",o],["alpha","azimuth",o],["srsCode","name"]].forEach(function(e){return function(t,e){var i=e[0],n=e[1];!(i in t)&&n in t&&(t[i]=t[n],3===e.length&&(t[i]=e[2](t[i])))}(t,e)}),t.long0||!t.longc||"Albers_Conic_Equal_Area"!==t.projName&&"Lambert_Azimuthal_Equal_Area"!==t.projName||(t.long0=t.longc);t.lat_ts||!t.lat1||"Stereographic_South_Pole"!==t.projName&&"Polar Stereographic (variant B)"!==t.projName||(t.lat0=o(t.lat1>0?90:-90),t.lat_ts=t.lat1)}(l.output),a(e,l.output)}},function(t,e,i){function n(t,e,i,o,s){for(i=i||0,o=o||t.length-1,s=s||function(t,e){return te?1:0};o>i;){if(o-i>600){var a=o-i+1,l=e-i+1,h=Math.log(a),c=.5*Math.exp(2*h/3),u=.5*Math.sqrt(h*c*(a-c)/a)*(l-a/2<0?-1:1),_=Math.max(i,Math.floor(e-l*c/a+u)),p=Math.min(o,Math.floor(e+(a-l)*c/a+u));n(t,e,_,p,s)}var d=t[e],f=i,v=o;for(r(t,i,e),s(t[o],d)>0&&r(t,i,o);f0;)v--}0===s(t[i],d)?r(t,i,v):r(t,++v,o),v<=e&&(i=v+1),e<=v&&(o=v-1)}}function r(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}e.exports=n},function(t,e,i){function n(t,e){if(!(this instanceof n))return new n(t,e);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&this._initFormat(e),this.clear()}function r(t,e){o(t,0,t.children.length,e,t)}function o(t,e,i,n,r){r||(r=p(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var o,a=e;a=t.minX&&e.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function d(t,e,i,n,r){for(var o,s=[e,i];s.length;)i=s.pop(),e=s.pop(),i-e<=n||(o=e+Math.ceil((i-e)/n/2)*n,f(t,o,e,i,r),s.push(e,o,o,i))}e.exports=n;var f=t(375);n.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!_(t,e))return i;for(var r,o,s,a,l=[];e;){for(r=0,o=e.children.length;r=0&&o[e].children.length>this._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(r,o,e)},_split:function(t,e){var i=t[e],n=i.children.length,o=this._minEntries;this._chooseSplitAxis(i,o,n);var s=this._chooseSplitIndex(i,o,n),a=p(i.children.splice(s,i.children.length-s));a.height=i.height,a.leaf=i.leaf,r(i,this.toBBox),r(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=p([t,e]),this.data.height=t.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,r,s,a,l,c,u,_;for(c=u=1/0,n=e;n<=i-e;n++)r=o(t,0,n,this.toBBox),s=o(t,n,i,this.toBBox),a=function(t,e){var i=Math.max(t.minX,e.minX),n=Math.max(t.minY,e.minY),r=Math.min(t.maxX,e.maxX),o=Math.min(t.maxY,e.maxY);return Math.max(0,r-i)*Math.max(0,o-n)}(r,s),l=h(r)+h(s),a=e;r--)a=t.children[r],s(u,t.leaf?l(a):a),_+=c(u);return _},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)s(e[n],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():r(t[i],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}},function(t,e,i){!function(){"use strict";function t(e){return function(e,i){var r,o,s,a,l,h,c,u,_,p=1,d=e.length,f="";for(o=0;o=0),a[8]){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,a[6]?parseInt(a[6]):0);break;case"e":r=a[7]?parseFloat(r).toExponential(a[7]):parseFloat(r).toExponential();break;case"f":r=a[7]?parseFloat(r).toFixed(a[7]):parseFloat(r);break;case"g":r=a[7]?String(Number(r.toPrecision(a[7]))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=a[7]?r.substring(0,a[7]):r;break;case"t":r=String(!!r),r=a[7]?r.substring(0,a[7]):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=a[7]?r.substring(0,a[7]):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=a[7]?r.substring(0,a[7]):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}n.json.test(a[8])?f+=r:(!n.number.test(a[8])||u&&!a[3]?_="":(_=u?"+":"-",r=r.toString().replace(n.sign,"")),h=a[4]?"0"===a[4]?"0":a[4].charAt(1):" ",c=a[6]-(_+r).length,l=a[6]&&c>0?h.repeat(c):"",f+=a[5]?_+r+l:"0"===h?_+l+r:l+_+r)}return f}(function(t){if(r[t])return r[t];var e,i=t,o=[],s=0;for(;i;){if(null!==(e=n.text.exec(i)))o.push(e[0]);else if(null!==(e=n.modulo.exec(i)))o.push("%");else{if(null===(e=n.placeholder.exec(i)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){s|=1;var a=[],l=e[2],h=[];if(null===(h=n.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(h[1]);""!==(l=l.substring(h[0].length));)if(null!==(h=n.key_access.exec(l)))a.push(h[1]);else{if(null===(h=n.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(h[1])}e[2]=a}else s|=2;if(3===s)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");o.push(e)}i=i.substring(e[0].length)}return r[t]=o}(e),arguments)}function e(e,i){return t.apply(null,[e].concat(i||[]))}var n={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[\+\-]/},r=Object.create(null);void 0!==i&&(i.sprintf=t,i.vsprintf=e),"undefined"!=typeof window&&(window.sprintf=t,window.vsprintf=e)}()},function(t,e,i){!function(t){"object"==typeof e&&e.exports?e.exports=t():this.tz=t()}(function(){function t(t,e,i){var n,r=e.day[1];do{n=new Date(Date.UTC(i,e.month,Math.abs(r++)))}while(e.day[0]<7&&n.getUTCDay()!=e.day[0]);return n={clock:e.clock,sort:n.getTime(),rule:e,save:6e4*e.save,offset:t.offset},n[n.clock]=n.sort+6e4*e.time,n.posix?n.wallclock=n[n.clock]+(t.offset+e.saved):n.posix=n[n.clock]-(t.offset+e.saved),n}function e(e,i,n){var r,o,s,a,l,h,c,u=e[e.zone],_=[],p=new Date(n).getUTCFullYear(),d=1;for(r=1,o=u.length;r=p-d;--c)for(r=0,o=h.length;r=_[r][i]&&_[r][_[r].clock]>s[_[r].clock]&&(a=_[r])}return a&&((l=/^(.*)\/(.*)$/.exec(s.format))?a.abbrev=l[a.save?2:1]:a.abbrev=s.format.replace(/%s/,a.rule.letter)),a||s}function i(t,i){return"UTC"==t.zone?i:(t.entry=e(t,"posix",i),i+t.entry.offset+t.entry.save)}function n(t,i){if("UTC"==t.zone)return i;var n,r;return t.entry=n=e(t,"wallclock",i),0<(r=i-n.wallclock)&&r9)e+=a*c[h-10];else{if(o=new Date(i(t,e)),h<7)for(;a;)o.setUTCDate(o.getUTCDate()+s),o.getUTCDay()==h&&(a-=s);else 7==h?o.setUTCFullYear(o.getUTCFullYear()+a):8==h?o.setUTCMonth(o.getUTCMonth()+a):o.setUTCDate(o.getUTCDate()+a);null==(e=n(t,o.getTime()))&&(e=n(t,o.getTime()+864e5*s)-864e5*s)}return e}function o(t,e){var i,n,r;return n=new Date(Date.UTC(t.getUTCFullYear(),0)),i=Math.floor((t.getTime()-n.getTime())/864e5),n.getUTCDay()==e?r=0:8==(r=7-n.getUTCDay()+e)&&(r=1),i>=r?Math.floor((i-r)/7)+1:0}function s(t){var e,i,n;return i=t.getUTCFullYear(),e=new Date(Date.UTC(i,0)).getUTCDay(),(n=o(t,1)+(e>1&&e<=4?1:0))?53!=n||4==e||3==e&&29==new Date(i,1,29).getDate()?[n,t.getUTCFullYear()]:[1,t.getUTCFullYear()+1]:(i=t.getUTCFullYear()-1,e=new Date(Date.UTC(i,0)).getUTCDay(),n=4==e||3==e&&29==new Date(i,1,29).getDate()?53:52,[n,t.getUTCFullYear()-1])}var a={clock:function(){return+new Date},zone:"UTC",entry:{abbrev:"UTC",offset:0,save:0},UTC:1,z:function(t,e,i,n){var r,o,s=this.entry.offset+this.entry.save,a=Math.abs(s/1e3),l=[],h=3600;for(r=0;r<3;r++)l.push(("0"+Math.floor(a/h)).slice(-2)),a%=h,h/=60;return"^"!=i||s?("^"==i&&(n=3),3==n?(o=(o=l.join(":")).replace(/:00$/,""),"^"!=i&&(o=o.replace(/:00$/,""))):n?(o=l.slice(0,n+1).join(":"),"^"==i&&(o=o.replace(/:00$/,""))):o=l.slice(0,2).join(""),o=(s<0?"-":"+")+o,o=o.replace(/([-+])(0)/,{_:" $1","-":"$1"}[i]||"$1$2")):"Z"},"%":function(t){return"%"},n:function(t){return"\n"},t:function(t){return"\t"},U:function(t){return o(t,0)},W:function(t){return o(t,1)},V:function(t){return s(t)[0]},G:function(t){return s(t)[1]},g:function(t){return s(t)[1]%100},j:function(t){return Math.floor((t.getTime()-Date.UTC(t.getUTCFullYear(),0))/864e5)+1},s:function(t){return Math.floor(t.getTime()/1e3)},C:function(t){return Math.floor(t.getUTCFullYear()/100)},N:function(t){return t.getTime()%1e3*1e6},m:function(t){return t.getUTCMonth()+1},Y:function(t){return t.getUTCFullYear()},y:function(t){return t.getUTCFullYear()%100},H:function(t){return t.getUTCHours()},M:function(t){return t.getUTCMinutes()},S:function(t){return t.getUTCSeconds()},e:function(t){return t.getUTCDate()},d:function(t){return t.getUTCDate()},u:function(t){return t.getUTCDay()||7},w:function(t){return t.getUTCDay()},l:function(t){return t.getUTCHours()%12||12},I:function(t){return t.getUTCHours()%12||12},k:function(t){return t.getUTCHours()},Z:function(t){return this.entry.abbrev},a:function(t){return this[this.locale].day.abbrev[t.getUTCDay()]},A:function(t){return this[this.locale].day.full[t.getUTCDay()]},h:function(t){return this[this.locale].month.abbrev[t.getUTCMonth()]},b:function(t){return this[this.locale].month.abbrev[t.getUTCMonth()]},B:function(t){return this[this.locale].month.full[t.getUTCMonth()]},P:function(t){return this[this.locale].meridiem[Math.floor(t.getUTCHours()/12)].toLowerCase()},p:function(t){return this[this.locale].meridiem[Math.floor(t.getUTCHours()/12)]},R:function(t,e){return this.convert([e,"%H:%M"])},T:function(t,e){return this.convert([e,"%H:%M:%S"])},D:function(t,e){return this.convert([e,"%m/%d/%y"])},F:function(t,e){return this.convert([e,"%Y-%m-%d"])},x:function(t,e){return this.convert([e,this[this.locale].date])},r:function(t,e){return this.convert([e,this[this.locale].time12||"%I:%M:%S"])},X:function(t,e){return this.convert([e,this[this.locale].time24])},c:function(t,e){return this.convert([e,this[this.locale].dateTime])},convert:function(t){if(!t.length)return"1.0.13";var e,o,s,a,l,c=Object.create(this),u=[];for(e=0;e=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},a=function(t,e){return function(i,n){e(i,n,t)}},l=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},h=function(t,e,i,n){return new(i||(i=Promise))(function(r,o){function s(t){try{l(n.next(t))}catch(t){o(t)}}function a(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){t.done?r(t.value):new i(function(e){e(t.value)}).then(s,a)}l((n=n.apply(t,e||[])).next())})},c=function(t,e){function i(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=r[2&i[0]?"return":i[0]?"throw":"next"])&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[0,o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!(o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}}},p=function(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,r,o=i.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return s},d=function(){for(var t=[],e=0;e1||r(t,e)})})}function r(t,e){try{!function(t){t.value instanceof f?Promise.resolve(t.value.v).then(o,s):a(c[0][2],t)}(h[t](e))}catch(t){a(c[0][3],t)}}function o(t){r("next",t)}function s(t){r("throw",t)}function a(t,e){t(e),c.shift(),c.length&&r(c[0][0],c[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l,h=i.apply(t,e||[]),c=[];return l={},n("next"),n("throw"),n("return"),l[Symbol.asyncIterator]=function(){return this},l},m=function(t){function e(e,r){t[e]&&(i[e]=function(i){return(n=!n)?{value:f(t[e](i)),done:"return"===e}:r?r(i):i})}var i,n;return i={},e("next"),e("throw",function(t){throw t}),e("return"),i[Symbol.iterator]=function(){return this},i},g=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator];return e?e.call(t):"function"==typeof _?_(t):t[Symbol.iterator]()},y=function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},t("__extends",n),t("__assign",r),t("__rest",o),t("__decorate",s),t("__param",a),t("__metadata",l),t("__awaiter",h),t("__generator",c),t("__exportStar",u),t("__values",_),t("__read",p),t("__spread",d),t("__await",f),t("__asyncGenerator",v),t("__asyncDelegator",m),t("__asyncValues",g),t("__makeTemplateObject",y)})}],{base:0,"client/connection":1,"client/session":2,"core/bokeh_events":3,"core/build_views":4,"core/dom":5,"core/dom_view":6,"core/enums":7,"core/has_props":8,"core/hittest":9,"core/layout/alignments":10,"core/layout/layout_canvas":11,"core/layout/side_panel":12,"core/layout/solver":13,"core/logging":14,"core/properties":15,"core/property_mixins":16,"core/selection_manager":17,"core/settings":18,"core/signaling":19,"core/ui_events":20,"core/util/array":21,"core/util/arrayable":22,"core/util/assert":23,"core/util/bbox":24,"core/util/callback":25,"core/util/canvas":26,"core/util/color":27,"core/util/compat":28,"core/util/data_structures":29,"core/util/eq":30,"core/util/math":31,"core/util/object":32,"core/util/projections":33,"core/util/refs":34,"core/util/selection":35,"core/util/serialization":36,"core/util/spatial":37,"core/util/string":38,"core/util/svg_colors":39,"core/util/templating":40,"core/util/text":41,"core/util/throttle":42,"core/util/typed_array":43,"core/util/types":44,"core/util/wheel":45,"core/util/zoom":46,"core/vectorization":47,"core/view":48,"core/visuals":49,document:50,embed:51,main:52,model:53,"models/annotations/annotation":54,"models/annotations/arrow":55,"models/annotations/arrow_head":56,"models/annotations/band":57,"models/annotations/box_annotation":58,"models/annotations/color_bar":59,"models/annotations/index":60,"models/annotations/label":61,"models/annotations/label_set":62,"models/annotations/legend":63,"models/annotations/legend_item":64,"models/annotations/poly_annotation":65,"models/annotations/span":66,"models/annotations/text_annotation":67,"models/annotations/title":68,"models/annotations/toolbar_panel":69,"models/annotations/tooltip":70,"models/annotations/whisker":71,"models/axes/axis":72,"models/axes/categorical_axis":73,"models/axes/continuous_axis":74,"models/axes/datetime_axis":75,"models/axes/index":76,"models/axes/linear_axis":77,"models/axes/log_axis":78,"models/axes/mercator_axis":79,"models/callbacks/callback":80,"models/callbacks/customjs":81,"models/callbacks/index":82,"models/callbacks/open_url":83,"models/canvas/canvas":84,"models/canvas/cartesian_frame":85,"models/canvas/index":86,"models/expressions/expression":87,"models/expressions/index":88,"models/expressions/stack":89,"models/filters/boolean_filter":90,"models/filters/customjs_filter":91,"models/filters/filter":92,"models/filters/group_filter":93,"models/filters/index":94,"models/filters/index_filter":95,"models/formatters/basic_tick_formatter":96,"models/formatters/categorical_tick_formatter":97,"models/formatters/datetime_tick_formatter":98,"models/formatters/func_tick_formatter":99,"models/formatters/index":100,"models/formatters/log_tick_formatter":101,"models/formatters/mercator_tick_formatter":102,"models/formatters/numeral_tick_formatter":103,"models/formatters/printf_tick_formatter":104,"models/formatters/tick_formatter":105,"models/glyphs/annular_wedge":106,"models/glyphs/annulus":107,"models/glyphs/arc":108,"models/glyphs/bezier":109,"models/glyphs/box":110,"models/glyphs/circle":111,"models/glyphs/ellipse":112,"models/glyphs/glyph":113,"models/glyphs/hbar":114,"models/glyphs/hex_tile":115,"models/glyphs/image":116,"models/glyphs/image_rgba":117,"models/glyphs/image_url":118,"models/glyphs/index":119,"models/glyphs/line":120,"models/glyphs/multi_line":121,"models/glyphs/oval":122,"models/glyphs/patch":123,"models/glyphs/patches":124,"models/glyphs/quad":125,"models/glyphs/quadratic":126,"models/glyphs/ray":127,"models/glyphs/rect":128,"models/glyphs/segment":129,"models/glyphs/step":130,"models/glyphs/text":131,"models/glyphs/utils":132,"models/glyphs/vbar":133,"models/glyphs/wedge":134,"models/glyphs/xy_glyph":135,"models/graphs/graph_hit_test_policy":136,"models/graphs/index":137,"models/graphs/layout_provider":138,"models/graphs/static_layout_provider":139,"models/grids/grid":140,"models/grids/index":141,"models/index":142,"models/layouts/box":143,"models/layouts/column":144,"models/layouts/index":145,"models/layouts/layout_dom":146,"models/layouts/row":147,"models/layouts/spacer":148,"models/layouts/widget_box":149,"models/mappers/categorical_color_mapper":150,"models/mappers/color_mapper":151,"models/mappers/continuous_color_mapper":152,"models/mappers/index":153,"models/mappers/linear_color_mapper":154,"models/mappers/log_color_mapper":155,"models/markers/index":156,"models/markers/marker":157,"models/plots/gmap_plot":158,"models/plots/gmap_plot_canvas":159,"models/plots/index":160,"models/plots/plot":161,"models/plots/plot_canvas":162,"models/ranges/data_range":163,"models/ranges/data_range1d":164,"models/ranges/factor_range":165,"models/ranges/index":166,"models/ranges/range":167,"models/ranges/range1d":168,"models/renderers/glyph_renderer":169,"models/renderers/graph_renderer":170,"models/renderers/guide_renderer":171,"models/renderers/index":172,"models/renderers/renderer":173,"models/scales/categorical_scale":174,"models/scales/index":175,"models/scales/linear_scale":176,"models/scales/log_scale":177,"models/scales/scale":178,"models/selections/index":179,"models/selections/interaction_policy":180,"models/selections/selection":181,"models/sources/ajax_data_source":182,"models/sources/cds_view":183,"models/sources/column_data_source":184,"models/sources/columnar_data_source":185,"models/sources/data_source":186,"models/sources/geojson_data_source":187,"models/sources/index":188,"models/sources/remote_data_source":189,"models/tickers/adaptive_ticker":190,"models/tickers/basic_ticker":191,"models/tickers/categorical_ticker":192,"models/tickers/composite_ticker":193,"models/tickers/continuous_ticker":194,"models/tickers/datetime_ticker":195,"models/tickers/days_ticker":196,"models/tickers/fixed_ticker":197,"models/tickers/index":198,"models/tickers/log_ticker":199,"models/tickers/mercator_ticker":200,"models/tickers/months_ticker":201,"models/tickers/single_interval_ticker":202,"models/tickers/ticker":203,"models/tickers/util":204,"models/tickers/years_ticker":205,"models/tiles/bbox_tile_source":206,"models/tiles/image_pool":207,"models/tiles/index":208,"models/tiles/mercator_tile_source":209,"models/tiles/quadkey_tile_source":210,"models/tiles/tile_renderer":211,"models/tiles/tile_source":212,"models/tiles/tile_utils":213,"models/tiles/tms_tile_source":214,"models/tiles/wmts_tile_source":215,"models/tools/actions/action_tool":216,"models/tools/actions/help_tool":217,"models/tools/actions/redo_tool":218,"models/tools/actions/reset_tool":219,"models/tools/actions/save_tool":220,"models/tools/actions/undo_tool":221,"models/tools/actions/zoom_in_tool":222,"models/tools/actions/zoom_out_tool":223,"models/tools/button_tool":224,"models/tools/edit/box_edit_tool":225,"models/tools/edit/edit_tool":226,"models/tools/edit/point_draw_tool":227,"models/tools/edit/poly_draw_tool":228,"models/tools/edit/poly_edit_tool":229,"models/tools/gestures/box_select_tool":230,"models/tools/gestures/box_zoom_tool":231,"models/tools/gestures/gesture_tool":232,"models/tools/gestures/lasso_select_tool":233,"models/tools/gestures/pan_tool":234,"models/tools/gestures/poly_select_tool":235,"models/tools/gestures/select_tool":236,"models/tools/gestures/tap_tool":237,"models/tools/gestures/wheel_pan_tool":238,"models/tools/gestures/wheel_zoom_tool":239,"models/tools/index":240,"models/tools/inspectors/crosshair_tool":241,"models/tools/inspectors/hover_tool":242,"models/tools/inspectors/inspect_tool":243,"models/tools/on_off_button":244,"models/tools/tool":245,"models/tools/tool_proxy":246,"models/tools/toolbar":247,"models/tools/toolbar_base":248,"models/tools/toolbar_box":249,"models/transforms/customjs_transform":250,"models/transforms/dodge":251,"models/transforms/index":252,"models/transforms/interpolator":253,"models/transforms/jitter":254,"models/transforms/linear_interpolator":255,"models/transforms/step_interpolator":256,"models/transforms/transform":257,polyfill:258,"protocol/index":259,"protocol/message":260,"protocol/receiver":261,safely:262,version:263})}(this);/*! +Copyright (c) 2012, Anaconda, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +Neither the name of Anaconda nor the names of any contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGE. +*/ + +//# sourceMappingURL=bokeh.min.js.map diff --git a/gelweb/gel2mdt/templates/gel2mdt/audit.html b/gelweb/gel2mdt/templates/gel2mdt/audit.html index 24783c85..39e4f73c 100755 --- a/gelweb/gel2mdt/templates/gel2mdt/audit.html +++ b/gelweb/gel2mdt/templates/gel2mdt/audit.html @@ -1,8 +1,9 @@ {% extends 'gel2mdt/base.html' %} +{% load static %} {% block bokeh_head %} - - + + {% if script %} {{script|safe}} {% endif %} From c3a77ec3b11a6bca2caa875caf95950630800e41 Mon Sep 17 00:00:00 2001 From: Theo Cole Date: Thu, 13 Sep 2018 15:58:28 +0100 Subject: [PATCH 10/10] removal of value display --- gelweb/gel2mdt/database_utils/multiple_case_adder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gelweb/gel2mdt/database_utils/multiple_case_adder.py b/gelweb/gel2mdt/database_utils/multiple_case_adder.py index 12304a0e..ee75d7f4 100755 --- a/gelweb/gel2mdt/database_utils/multiple_case_adder.py +++ b/gelweb/gel2mdt/database_utils/multiple_case_adder.py @@ -413,11 +413,11 @@ def add_cases(self, update=False): elif many: model_list = [] for case in tqdm(cases, desc="Parsing {model_type} into DB".format(model_type=model_type.__name__)): + tqdm.write(case.request_id) attribute_manager = case.attribute_managers[model_type] many_case_model = attribute_manager.case_model for case_model in tqdm(many_case_model.case_models, desc=case.request_id): model_list.append(case_model) - tqdm.write(str(case_model.entry)) # now create the required new Model instances from CaseModel lists if model_type == GELInterpretationReport: