rasa-pro 3.12.0.dev2__py3-none-any.whl → 3.12.0.dev4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of rasa-pro might be problematic. Click here for more details.
- rasa/__main__.py +7 -7
- rasa/anonymization/anonymisation_rule_yaml_reader.py +1 -1
- rasa/anonymization/anonymization_pipeline.py +3 -3
- rasa/anonymization/anonymization_rule_executor.py +1 -1
- rasa/anonymization/anonymization_rule_orchestrator.py +2 -3
- rasa/cli/arguments/data.py +2 -2
- rasa/cli/arguments/evaluate.py +2 -1
- rasa/cli/arguments/interactive.py +1 -1
- rasa/cli/arguments/run.py +1 -1
- rasa/cli/arguments/test.py +7 -5
- rasa/cli/arguments/train.py +3 -3
- rasa/cli/arguments/visualize.py +2 -2
- rasa/cli/arguments/x.py +1 -0
- rasa/cli/data.py +4 -3
- rasa/cli/dialogue_understanding_test.py +121 -18
- rasa/cli/evaluate.py +1 -1
- rasa/cli/export.py +6 -6
- rasa/cli/interactive.py +4 -5
- rasa/cli/llm_fine_tuning.py +5 -5
- rasa/cli/markers.py +1 -2
- rasa/cli/project_templates/calm/actions/add_contact.py +1 -1
- rasa/cli/project_templates/tutorial/actions/actions.py +3 -2
- rasa/cli/shell.py +2 -3
- rasa/cli/studio/download.py +1 -2
- rasa/cli/studio/studio.py +2 -3
- rasa/cli/studio/train.py +0 -1
- rasa/cli/telemetry.py +2 -2
- rasa/cli/test.py +11 -11
- rasa/cli/utils.py +7 -5
- rasa/core/__init__.py +0 -1
- rasa/core/actions/action.py +42 -21
- rasa/core/actions/action_hangup.py +1 -1
- rasa/core/actions/action_repeat_bot_messages.py +2 -2
- rasa/core/actions/action_run_slot_rejections.py +2 -2
- rasa/core/actions/action_trigger_chitchat.py +1 -1
- rasa/core/actions/action_trigger_flow.py +5 -5
- rasa/core/actions/action_trigger_search.py +1 -1
- rasa/core/actions/forms.py +14 -12
- rasa/core/actions/http_custom_action_executor.py +8 -1
- rasa/core/actions/loops.py +3 -3
- rasa/core/actions/two_stage_fallback.py +13 -13
- rasa/core/auth_retry_tracker_store.py +1 -2
- rasa/core/brokers/broker.py +2 -1
- rasa/core/brokers/file.py +1 -1
- rasa/core/brokers/kafka.py +8 -8
- rasa/core/brokers/pika.py +8 -9
- rasa/core/brokers/sql.py +4 -3
- rasa/core/channels/__init__.py +3 -0
- rasa/core/channels/botframework.py +2 -2
- rasa/core/channels/callback.py +4 -4
- rasa/core/channels/channel.py +11 -11
- rasa/core/channels/console.py +0 -1
- rasa/core/channels/development_inspector.py +6 -6
- rasa/core/channels/facebook.py +5 -5
- rasa/core/channels/hangouts.py +7 -8
- rasa/core/channels/inspector/dist/assets/{arc-861ddd57.js → arc-632a63ec.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{c4Diagram-d0fbc5ce-921f02db.js → c4Diagram-d0fbc5ce-081e0df4.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{classDiagram-936ed81e-b436c4f8.js → classDiagram-936ed81e-3df0afc2.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{classDiagram-v2-c3cb15f1-511a23cb.js → classDiagram-v2-c3cb15f1-8c5ed31e.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{createText-62fc7601-ef476ecd.js → createText-62fc7601-89c73b31.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{edges-f2ad444c-f1878e0a.js → edges-f2ad444c-4fc48c3e.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{erDiagram-9d236eb7-fac75185.js → erDiagram-9d236eb7-907e0440.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{flowDb-1972c806-201c5bbc.js → flowDb-1972c806-9ec53a3c.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{flowDiagram-7ea5b25a-f904ae41.js → flowDiagram-7ea5b25a-41da787a.js} +1 -1
- rasa/core/channels/inspector/dist/assets/flowDiagram-v2-855bc5b3-8bea338b.js +1 -0
- rasa/core/channels/inspector/dist/assets/{flowchart-elk-definition-abe16c3d-1813da66.js → flowchart-elk-definition-abe16c3d-ce370633.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{ganttDiagram-9b5ea136-872af172.js → ganttDiagram-9b5ea136-90a36523.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{gitGraphDiagram-99d0ae7c-34a0af5a.js → gitGraphDiagram-99d0ae7c-41e1aa3f.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{index-2c4b9a3b-42ba3e3d.js → index-2c4b9a3b-e6f2af62.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{index-37817b51.js → index-e793d777.js} +3 -3
- rasa/core/channels/inspector/dist/assets/{infoDiagram-736b4530-6b731386.js → infoDiagram-736b4530-8ceba4db.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{journeyDiagram-df861f2b-e8579ac6.js → journeyDiagram-df861f2b-960d3809.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{layout-89e6403a.js → layout-498807d8.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{line-dc73d3fc.js → line-eeccc4e2.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{linear-f5b1d2bc.js → linear-8a078617.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{mindmap-definition-beec6740-82cb74fa.js → mindmap-definition-beec6740-396d17dd.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{pieDiagram-dbbf0591-bdf5f29b.js → pieDiagram-dbbf0591-dc9b5e1b.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{quadrantDiagram-4d7f4fd6-c7a0cbe4.js → quadrantDiagram-4d7f4fd6-a08cba6d.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{requirementDiagram-6fc4c22a-7ec5410f.js → requirementDiagram-6fc4c22a-87242b9e.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{sankeyDiagram-8f13d901-caee5554.js → sankeyDiagram-8f13d901-53f6f391.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{sequenceDiagram-b655622a-2935f8db.js → sequenceDiagram-b655622a-715c9c20.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{stateDiagram-59f0c015-8f5d9693.js → stateDiagram-59f0c015-2e8fb31f.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{stateDiagram-v2-2b26beab-d565d1de.js → stateDiagram-v2-2b26beab-7e2d2aa0.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{styles-080da4f6-75ad421d.js → styles-080da4f6-4420cea6.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{styles-3dcbcfbf-7e764226.js → styles-3dcbcfbf-28676cf4.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{styles-9c745c82-7a4e0e61.js → styles-9c745c82-cef936a6.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{svgDrawCommon-4835440b-4019d1bf.js → svgDrawCommon-4835440b-151251e9.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{timeline-definition-5b62e21b-01ea12df.js → timeline-definition-5b62e21b-0d39bdb2.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{xychartDiagram-2b33534f-89407137.js → xychartDiagram-2b33534f-a03fa445.js} +1 -1
- rasa/core/channels/inspector/dist/index.html +3 -1
- rasa/core/channels/inspector/index.html +2 -0
- rasa/core/channels/inspector/src/App.tsx +1 -4
- rasa/core/channels/mattermost.py +4 -4
- rasa/core/channels/rasa_chat.py +4 -4
- rasa/core/channels/rest.py +11 -12
- rasa/core/channels/rocketchat.py +4 -3
- rasa/core/channels/slack.py +6 -5
- rasa/core/channels/socketio.py +7 -28
- rasa/core/channels/studio_chat.py +193 -0
- rasa/core/channels/telegram.py +73 -41
- rasa/core/channels/twilio.py +3 -3
- rasa/core/channels/vier_cvg.py +2 -2
- rasa/core/channels/voice_ready/audiocodes.py +8 -8
- rasa/core/channels/voice_ready/jambonz.py +5 -5
- rasa/core/channels/voice_ready/jambonz_protocol.py +3 -4
- rasa/core/channels/voice_ready/twilio_voice.py +9 -8
- rasa/core/channels/voice_ready/utils.py +1 -1
- rasa/core/channels/voice_stream/asr/asr_engine.py +2 -2
- rasa/core/channels/voice_stream/asr/azure.py +2 -2
- rasa/core/channels/voice_stream/asr/deepgram.py +57 -16
- rasa/core/channels/voice_stream/browser_audio.py +9 -6
- rasa/core/channels/voice_stream/call_state.py +2 -1
- rasa/core/channels/voice_stream/tts/azure.py +1 -2
- rasa/core/channels/voice_stream/tts/cartesia.py +5 -4
- rasa/core/channels/voice_stream/tts/tts_cache.py +3 -2
- rasa/core/channels/voice_stream/tts/tts_engine.py +1 -1
- rasa/core/channels/voice_stream/twilio_media_streams.py +10 -7
- rasa/core/channels/voice_stream/util.py +1 -1
- rasa/core/channels/voice_stream/voice_channel.py +15 -15
- rasa/core/channels/webexteams.py +3 -4
- rasa/core/evaluation/marker.py +7 -6
- rasa/core/evaluation/marker_base.py +15 -16
- rasa/core/evaluation/marker_stats.py +3 -4
- rasa/core/evaluation/marker_tracker_loader.py +5 -4
- rasa/core/exporter.py +4 -4
- rasa/core/featurizers/precomputation.py +8 -8
- rasa/core/featurizers/single_state_featurizer.py +7 -7
- rasa/core/featurizers/tracker_featurizers.py +13 -13
- rasa/core/http_interpreter.py +3 -4
- rasa/core/information_retrieval/__init__.py +1 -1
- rasa/core/information_retrieval/faiss.py +4 -4
- rasa/core/information_retrieval/information_retrieval.py +2 -2
- rasa/core/information_retrieval/milvus.py +3 -3
- rasa/core/information_retrieval/qdrant.py +3 -3
- rasa/core/jobs.py +1 -0
- rasa/core/lock.py +2 -3
- rasa/core/lock_store.py +3 -3
- rasa/core/migrate.py +11 -8
- rasa/core/nlg/__init__.py +1 -1
- rasa/core/nlg/callback.py +2 -3
- rasa/core/nlg/contextual_response_rephraser.py +63 -13
- rasa/core/nlg/generator.py +2 -2
- rasa/core/nlg/interpolator.py +4 -3
- rasa/core/nlg/response.py +3 -4
- rasa/core/nlg/summarize.py +1 -0
- rasa/core/persistor.py +3 -3
- rasa/core/policies/ensemble.py +10 -9
- rasa/core/policies/enterprise_search_policy.py +86 -21
- rasa/core/policies/flow_policy.py +13 -14
- rasa/core/policies/flows/flow_executor.py +35 -11
- rasa/core/policies/intentless_policy.py +6 -7
- rasa/core/policies/memoization.py +22 -20
- rasa/core/policies/policy.py +24 -22
- rasa/core/policies/rule_policy.py +37 -36
- rasa/core/policies/ted_policy.py +87 -85
- rasa/core/policies/unexpected_intent_policy.py +77 -75
- rasa/core/processor.py +96 -65
- rasa/core/run.py +1 -1
- rasa/core/secrets_manager/endpoints.py +2 -3
- rasa/core/secrets_manager/factory.py +2 -3
- rasa/core/secrets_manager/secret_manager.py +2 -3
- rasa/core/secrets_manager/vault.py +2 -2
- rasa/core/test.py +30 -30
- rasa/core/tracker_store.py +15 -15
- rasa/core/train.py +1 -1
- rasa/core/training/__init__.py +2 -2
- rasa/core/training/converters/responses_prefix_converter.py +1 -2
- rasa/core/training/interactive.py +13 -13
- rasa/core/training/story_conflict.py +4 -5
- rasa/core/training/training.py +3 -5
- rasa/core/utils.py +5 -5
- rasa/core/visualize.py +1 -1
- rasa/dialogue_understanding/coexistence/intent_based_router.py +2 -2
- rasa/dialogue_understanding/coexistence/llm_based_router.py +5 -5
- rasa/dialogue_understanding/commands/__init__.py +22 -22
- rasa/dialogue_understanding/commands/can_not_handle_command.py +20 -1
- rasa/dialogue_understanding/commands/cancel_flow_command.py +18 -7
- rasa/dialogue_understanding/commands/change_flow_command.py +18 -2
- rasa/dialogue_understanding/commands/chit_chat_answer_command.py +18 -4
- rasa/dialogue_understanding/commands/clarify_command.py +19 -3
- rasa/dialogue_understanding/commands/command.py +19 -3
- rasa/dialogue_understanding/commands/correct_slots_command.py +3 -3
- rasa/dialogue_understanding/commands/error_command.py +1 -1
- rasa/dialogue_understanding/commands/free_form_answer_command.py +2 -1
- rasa/dialogue_understanding/commands/handle_code_change_command.py +2 -2
- rasa/dialogue_understanding/commands/human_handoff_command.py +16 -4
- rasa/dialogue_understanding/commands/knowledge_answer_command.py +18 -4
- rasa/dialogue_understanding/commands/noop_command.py +2 -1
- rasa/dialogue_understanding/commands/repeat_bot_messages_command.py +16 -4
- rasa/dialogue_understanding/commands/restart_command.py +2 -5
- rasa/dialogue_understanding/commands/session_end_command.py +3 -5
- rasa/dialogue_understanding/commands/session_start_command.py +3 -5
- rasa/dialogue_understanding/commands/set_slot_command.py +27 -3
- rasa/dialogue_understanding/commands/skip_question_command.py +16 -4
- rasa/dialogue_understanding/commands/start_flow_command.py +17 -2
- rasa/dialogue_understanding/commands/user_silence_command.py +3 -5
- rasa/dialogue_understanding/commands/utils.py +64 -45
- rasa/dialogue_understanding/constants.py +1 -0
- rasa/dialogue_understanding/generator/command_generator.py +2 -119
- rasa/dialogue_understanding/generator/command_parser.py +201 -0
- rasa/dialogue_understanding/generator/constants.py +2 -2
- rasa/dialogue_understanding/generator/flow_retrieval.py +7 -7
- rasa/dialogue_understanding/generator/llm_based_command_generator.py +11 -57
- rasa/dialogue_understanding/generator/llm_command_generator.py +2 -1
- rasa/dialogue_understanding/generator/multi_step/multi_step_llm_command_generator.py +67 -120
- rasa/dialogue_understanding/generator/nlu_command_adapter.py +8 -10
- rasa/dialogue_understanding/generator/single_step/single_step_llm_command_generator.py +32 -93
- rasa/dialogue_understanding/generator/utils.py +45 -0
- rasa/dialogue_understanding/patterns/cancel.py +2 -1
- rasa/dialogue_understanding/patterns/cannot_handle.py +1 -0
- rasa/dialogue_understanding/patterns/chitchat.py +1 -1
- rasa/dialogue_understanding/patterns/clarify.py +2 -1
- rasa/dialogue_understanding/patterns/code_change.py +2 -0
- rasa/dialogue_understanding/patterns/collect_information.py +6 -3
- rasa/dialogue_understanding/patterns/completed.py +1 -1
- rasa/dialogue_understanding/patterns/continue_interrupted.py +10 -1
- rasa/dialogue_understanding/patterns/correction.py +4 -2
- rasa/dialogue_understanding/patterns/human_handoff.py +1 -1
- rasa/dialogue_understanding/patterns/internal_error.py +1 -0
- rasa/dialogue_understanding/patterns/search.py +1 -1
- rasa/dialogue_understanding/patterns/session_start.py +1 -1
- rasa/dialogue_understanding/patterns/skip_question.py +1 -0
- rasa/dialogue_understanding/patterns/user_silence.py +1 -1
- rasa/dialogue_understanding/processor/command_processor.py +13 -9
- rasa/dialogue_understanding/processor/command_processor_component.py +1 -1
- rasa/dialogue_understanding/stack/dialogue_stack.py +4 -3
- rasa/dialogue_understanding/stack/frames/__init__.py +2 -2
- rasa/dialogue_understanding/stack/frames/chit_chat_frame.py +4 -1
- rasa/dialogue_understanding/stack/frames/dialogue_stack_frame.py +2 -3
- rasa/dialogue_understanding/stack/frames/flow_stack_frame.py +5 -2
- rasa/dialogue_understanding/stack/frames/search_frame.py +4 -1
- rasa/dialogue_understanding/stack/utils.py +8 -4
- rasa/dialogue_understanding/utils.py +121 -2
- rasa/dialogue_understanding_test/README.md +379 -0
- rasa/dialogue_understanding_test/command_comparison.py +60 -0
- rasa/dialogue_understanding_test/command_metric_calculation.py +110 -4
- rasa/dialogue_understanding_test/constants.py +6 -1
- rasa/dialogue_understanding_test/du_test_case.py +252 -38
- rasa/dialogue_understanding_test/du_test_result.py +291 -2
- rasa/dialogue_understanding_test/du_test_runner.py +239 -10
- rasa/dialogue_understanding_test/du_test_schema.yml +161 -0
- rasa/dialogue_understanding_test/io.py +338 -20
- rasa/dialogue_understanding_test/test_case_simulation/__init__.py +0 -0
- rasa/dialogue_understanding_test/test_case_simulation/exception.py +28 -0
- rasa/dialogue_understanding_test/test_case_simulation/test_case_tracker_simulator.py +336 -0
- rasa/dialogue_understanding_test/utils.py +70 -0
- rasa/dialogue_understanding_test/validation.py +59 -4
- rasa/e2e_test/aggregate_test_stats_calculator.py +1 -1
- rasa/e2e_test/assertions.py +1 -1
- rasa/e2e_test/e2e_config.py +1 -1
- rasa/e2e_test/e2e_test_case.py +3 -4
- rasa/e2e_test/e2e_test_converter.py +2 -3
- rasa/e2e_test/e2e_test_coverage_report.py +6 -6
- rasa/e2e_test/e2e_test_result.py +1 -1
- rasa/e2e_test/e2e_test_runner.py +134 -31
- rasa/e2e_test/stub_custom_action.py +1 -1
- rasa/e2e_test/utils/e2e_yaml_utils.py +1 -1
- rasa/e2e_test/utils/io.py +132 -65
- rasa/e2e_test/utils/validation.py +1 -1
- rasa/engine/caching.py +5 -7
- rasa/engine/constants.py +1 -1
- rasa/engine/graph.py +2 -2
- rasa/engine/recipes/default_components.py +13 -15
- rasa/engine/recipes/recipe.py +2 -2
- rasa/engine/runner/dask.py +2 -2
- rasa/engine/runner/interface.py +1 -0
- rasa/engine/storage/local_model_storage.py +5 -4
- rasa/engine/storage/resource.py +2 -1
- rasa/engine/storage/storage.py +5 -3
- rasa/engine/training/components.py +2 -1
- rasa/engine/training/fingerprinting.py +4 -2
- rasa/engine/training/graph_trainer.py +4 -4
- rasa/engine/training/hooks.py +2 -2
- rasa/engine/validation.py +34 -33
- rasa/exceptions.py +3 -2
- rasa/graph_components/converters/nlu_message_converter.py +3 -3
- rasa/graph_components/providers/domain_for_core_training_provider.py +3 -3
- rasa/graph_components/providers/domain_provider.py +3 -2
- rasa/graph_components/providers/flows_provider.py +2 -3
- rasa/graph_components/providers/forms_provider.py +4 -4
- rasa/graph_components/providers/nlu_training_data_provider.py +5 -3
- rasa/graph_components/providers/responses_provider.py +4 -4
- rasa/graph_components/providers/rule_only_provider.py +3 -2
- rasa/graph_components/providers/story_graph_provider.py +8 -8
- rasa/graph_components/providers/training_tracker_provider.py +3 -2
- rasa/graph_components/validators/default_recipe_validator.py +16 -16
- rasa/graph_components/validators/finetuning_validator.py +10 -8
- rasa/hooks.py +18 -12
- rasa/jupyter.py +2 -2
- rasa/llm_fine_tuning/annotation_module.py +4 -4
- rasa/llm_fine_tuning/conversations.py +6 -6
- rasa/llm_fine_tuning/llm_data_preparation_module.py +1 -1
- rasa/llm_fine_tuning/paraphrasing/conversation_rephraser.py +4 -4
- rasa/llm_fine_tuning/paraphrasing/rephrase_validator.py +1 -1
- rasa/llm_fine_tuning/paraphrasing_module.py +1 -1
- rasa/llm_fine_tuning/storage.py +3 -3
- rasa/markers/marker.py +2 -3
- rasa/markers/marker_base.py +1 -2
- rasa/markers/upload.py +2 -2
- rasa/markers/validate.py +2 -3
- rasa/model.py +3 -5
- rasa/model_manager/config.py +1 -1
- rasa/model_manager/model_api.py +5 -4
- rasa/model_manager/runner_service.py +6 -6
- rasa/model_manager/socket_bridge.py +8 -3
- rasa/model_manager/studio_jwt_auth.py +1 -0
- rasa/model_manager/trainer_service.py +9 -7
- rasa/model_manager/utils.py +1 -1
- rasa/model_manager/warm_rasa_process.py +14 -8
- rasa/model_service.py +5 -6
- rasa/model_testing.py +13 -15
- rasa/nlu/classifiers/diet_classifier.py +72 -73
- rasa/nlu/classifiers/fallback_classifier.py +9 -11
- rasa/nlu/classifiers/keyword_intent_classifier.py +7 -6
- rasa/nlu/classifiers/logistic_regression_classifier.py +3 -3
- rasa/nlu/classifiers/mitie_intent_classifier.py +5 -4
- rasa/nlu/classifiers/regex_message_handler.py +3 -2
- rasa/nlu/classifiers/sklearn_intent_classifier.py +2 -2
- rasa/nlu/convert.py +2 -2
- rasa/nlu/emulators/dialogflow.py +3 -3
- rasa/nlu/emulators/luis.py +5 -5
- rasa/nlu/emulators/no_emulator.py +1 -0
- rasa/nlu/emulators/wit.py +4 -4
- rasa/nlu/extractors/crf_entity_extractor.py +11 -11
- rasa/nlu/extractors/duckling_entity_extractor.py +7 -6
- rasa/nlu/extractors/entity_synonyms.py +10 -9
- rasa/nlu/extractors/extractor.py +16 -16
- rasa/nlu/extractors/mitie_entity_extractor.py +10 -9
- rasa/nlu/extractors/regex_entity_extractor.py +11 -10
- rasa/nlu/extractors/spacy_entity_extractor.py +2 -2
- rasa/nlu/featurizers/dense_featurizer/convert_featurizer.py +15 -14
- rasa/nlu/featurizers/dense_featurizer/dense_featurizer.py +2 -1
- rasa/nlu/featurizers/dense_featurizer/lm_featurizer.py +10 -9
- rasa/nlu/featurizers/dense_featurizer/mitie_featurizer.py +9 -7
- rasa/nlu/featurizers/dense_featurizer/spacy_featurizer.py +13 -12
- rasa/nlu/featurizers/featurizer.py +5 -4
- rasa/nlu/featurizers/sparse_featurizer/count_vectors_featurizer.py +6 -6
- rasa/nlu/featurizers/sparse_featurizer/lexical_syntactic_featurizer.py +4 -4
- rasa/nlu/featurizers/sparse_featurizer/regex_featurizer.py +4 -4
- rasa/nlu/featurizers/sparse_featurizer/sparse_featurizer.py +2 -0
- rasa/nlu/model.py +0 -1
- rasa/nlu/selectors/response_selector.py +67 -68
- rasa/nlu/test.py +38 -38
- rasa/nlu/tokenizers/jieba_tokenizer.py +1 -2
- rasa/nlu/tokenizers/mitie_tokenizer.py +2 -2
- rasa/nlu/tokenizers/spacy_tokenizer.py +3 -3
- rasa/nlu/tokenizers/tokenizer.py +6 -7
- rasa/nlu/tokenizers/whitespace_tokenizer.py +1 -1
- rasa/nlu/utils/bilou_utils.py +7 -7
- rasa/nlu/utils/hugging_face/registry.py +22 -22
- rasa/nlu/utils/hugging_face/transformers_pre_post_processors.py +2 -1
- rasa/nlu/utils/mitie_utils.py +2 -1
- rasa/nlu/utils/pattern_utils.py +1 -1
- rasa/nlu/utils/spacy_utils.py +3 -3
- rasa/plugin.py +12 -1
- rasa/server.py +37 -1
- rasa/shared/constants.py +22 -2
- rasa/shared/core/command_payload_reader.py +15 -7
- rasa/shared/core/constants.py +4 -1
- rasa/shared/core/conversation.py +1 -2
- rasa/shared/core/events.py +47 -37
- rasa/shared/core/flows/__init__.py +0 -1
- rasa/shared/core/flows/flow.py +11 -11
- rasa/shared/core/flows/flow_step.py +19 -13
- rasa/shared/core/flows/flow_step_links.py +21 -14
- rasa/shared/core/flows/flow_step_sequence.py +6 -4
- rasa/shared/core/flows/flows_list.py +3 -3
- rasa/shared/core/flows/nlu_trigger.py +1 -1
- rasa/shared/core/flows/steps/__init__.py +2 -2
- rasa/shared/core/flows/steps/action.py +4 -3
- rasa/shared/core/flows/steps/call.py +4 -4
- rasa/shared/core/flows/steps/collect.py +7 -4
- rasa/shared/core/flows/steps/continuation.py +3 -1
- rasa/shared/core/flows/steps/end.py +3 -1
- rasa/shared/core/flows/steps/internal.py +3 -2
- rasa/shared/core/flows/steps/link.py +6 -4
- rasa/shared/core/flows/steps/no_operation.py +7 -5
- rasa/shared/core/flows/steps/set_slots.py +4 -3
- rasa/shared/core/flows/steps/start.py +3 -1
- rasa/shared/core/flows/utils.py +1 -0
- rasa/shared/core/flows/validation.py +3 -5
- rasa/shared/core/generator.py +20 -21
- rasa/shared/core/slot_mappings.py +15 -15
- rasa/shared/core/slots.py +3 -3
- rasa/shared/core/trackers.py +31 -31
- rasa/shared/core/training_data/loading.py +1 -1
- rasa/shared/core/training_data/story_reader/story_reader.py +3 -3
- rasa/shared/core/training_data/story_reader/story_step_builder.py +4 -4
- rasa/shared/core/training_data/story_reader/yaml_story_reader.py +29 -31
- rasa/shared/core/training_data/story_writer/yaml_story_writer.py +22 -24
- rasa/shared/core/training_data/structures.py +11 -12
- rasa/shared/core/training_data/visualization.py +10 -10
- rasa/shared/data.py +6 -6
- rasa/shared/engine/caching.py +0 -1
- rasa/shared/exceptions.py +2 -2
- rasa/shared/importers/rasa.py +5 -6
- rasa/shared/importers/utils.py +1 -1
- rasa/shared/nlu/constants.py +3 -0
- rasa/shared/nlu/training_data/entities_parser.py +6 -6
- rasa/shared/nlu/training_data/features.py +3 -3
- rasa/shared/nlu/training_data/formats/__init__.py +1 -1
- rasa/shared/nlu/training_data/formats/dialogflow.py +4 -5
- rasa/shared/nlu/training_data/formats/luis.py +7 -8
- rasa/shared/nlu/training_data/formats/rasa.py +4 -5
- rasa/shared/nlu/training_data/formats/rasa_yaml.py +17 -16
- rasa/shared/nlu/training_data/formats/readerwriter.py +8 -11
- rasa/shared/nlu/training_data/formats/wit.py +3 -4
- rasa/shared/nlu/training_data/loading.py +4 -4
- rasa/shared/nlu/training_data/lookup_tables_parser.py +1 -1
- rasa/shared/nlu/training_data/message.py +13 -14
- rasa/shared/nlu/training_data/schemas/data_schema.py +1 -1
- rasa/shared/nlu/training_data/schemas/responses.yml +1 -0
- rasa/shared/nlu/training_data/synonyms_parser.py +3 -3
- rasa/shared/nlu/training_data/training_data.py +12 -13
- rasa/shared/nlu/training_data/util.py +11 -10
- rasa/shared/providers/_configs/azure_openai_client_config.py +3 -119
- rasa/shared/providers/_configs/client_config.py +1 -3
- rasa/shared/providers/_configs/default_litellm_client_config.py +1 -3
- rasa/shared/providers/_configs/huggingface_local_embedding_client_config.py +1 -3
- rasa/shared/providers/_configs/litellm_router_client_config.py +1 -3
- rasa/shared/providers/_configs/model_group_config.py +2 -7
- rasa/shared/providers/_configs/openai_client_config.py +1 -3
- rasa/shared/providers/_configs/rasa_llm_client_config.py +1 -3
- rasa/shared/providers/_configs/self_hosted_llm_client_config.py +1 -3
- rasa/shared/providers/_configs/utils.py +1 -0
- rasa/shared/providers/_ssl_verification_utils.py +5 -6
- rasa/shared/providers/_utils.py +5 -5
- rasa/shared/providers/embedding/_base_litellm_embedding_client.py +1 -1
- rasa/shared/providers/embedding/azure_openai_embedding_client.py +3 -26
- rasa/shared/providers/embedding/embedding_client.py +1 -1
- rasa/shared/providers/embedding/litellm_router_embedding_client.py +1 -3
- rasa/shared/providers/llm/_base_litellm_client.py +1 -3
- rasa/shared/providers/llm/azure_openai_llm_client.py +25 -79
- rasa/shared/providers/llm/default_litellm_llm_client.py +1 -3
- rasa/shared/providers/llm/litellm_router_llm_client.py +2 -21
- rasa/shared/providers/llm/llm_client.py +1 -3
- rasa/shared/providers/llm/llm_response.py +41 -2
- rasa/shared/providers/llm/openai_llm_client.py +3 -9
- rasa/shared/providers/llm/rasa_llm_client.py +6 -20
- rasa/shared/providers/llm/self_hosted_llm_client.py +3 -9
- rasa/shared/providers/mappings.py +18 -19
- rasa/shared/providers/router/_base_litellm_router_client.py +1 -3
- rasa/shared/providers/router/router_client.py +1 -3
- rasa/shared/utils/cli.py +1 -1
- rasa/shared/utils/common.py +1 -1
- rasa/shared/utils/health_check/embeddings_health_check_mixin.py +1 -1
- rasa/shared/utils/health_check/health_check.py +3 -3
- rasa/shared/utils/health_check/llm_health_check_mixin.py +1 -1
- rasa/shared/utils/io.py +1 -1
- rasa/shared/utils/llm.py +5 -9
- rasa/shared/utils/pykwalify_extensions.py +1 -1
- rasa/shared/utils/schemas/events.py +1 -1
- rasa/shared/utils/yaml.py +29 -26
- rasa/studio/auth.py +3 -3
- rasa/studio/config.py +1 -2
- rasa/studio/data_handler.py +3 -3
- rasa/studio/download.py +1 -1
- rasa/studio/results_logger.py +3 -3
- rasa/studio/upload.py +2 -0
- rasa/telemetry.py +31 -0
- rasa/tracing/config.py +3 -3
- rasa/tracing/instrumentation/attribute_extractors.py +54 -0
- rasa/tracing/instrumentation/instrumentation.py +25 -5
- rasa/tracing/instrumentation/intentless_policy_instrumentation.py +1 -1
- rasa/tracing/instrumentation/metrics.py +11 -11
- rasa/tracing/metric_instrument_provider.py +14 -14
- rasa/utils/common.py +12 -9
- rasa/utils/endpoints.py +1 -1
- rasa/utils/io.py +7 -7
- rasa/utils/licensing.py +3 -4
- rasa/utils/log_utils.py +7 -6
- rasa/utils/ml_utils.py +1 -0
- rasa/utils/plotting.py +3 -3
- rasa/utils/sanic_error_handler.py +1 -1
- rasa/utils/tensorflow/callback.py +2 -2
- rasa/utils/tensorflow/crf.py +2 -2
- rasa/utils/tensorflow/data_generator.py +5 -5
- rasa/utils/tensorflow/environment.py +3 -3
- rasa/utils/tensorflow/feature_array.py +2 -3
- rasa/utils/tensorflow/layers.py +18 -12
- rasa/utils/tensorflow/layers_utils.py +2 -1
- rasa/utils/tensorflow/metrics.py +2 -2
- rasa/utils/tensorflow/model_data.py +7 -7
- rasa/utils/tensorflow/model_data_utils.py +10 -9
- rasa/utils/tensorflow/models.py +31 -32
- rasa/utils/tensorflow/rasa_layers.py +20 -19
- rasa/utils/tensorflow/types.py +2 -1
- rasa/utils/train_utils.py +23 -21
- rasa/utils/url_tools.py +1 -1
- rasa/validator.py +17 -1
- rasa/version.py +1 -1
- {rasa_pro-3.12.0.dev2.dist-info → rasa_pro-3.12.0.dev4.dist-info}/METADATA +9 -10
- rasa_pro-3.12.0.dev4.dist-info/RECORD +800 -0
- rasa/core/channels/inspector/dist/assets/flowDiagram-v2-855bc5b3-b080d6f2.js +0 -1
- rasa/shared/providers/_configs/azure_entra_id_client_creds.py +0 -40
- rasa/shared/providers/_configs/azure_entra_id_config.py +0 -533
- rasa/shared/providers/_configs/oauth_config.py +0 -33
- rasa/shared/providers/constants.py +0 -6
- rasa_pro-3.12.0.dev2.dist-info/RECORD +0 -793
- {rasa_pro-3.12.0.dev2.dist-info → rasa_pro-3.12.0.dev4.dist-info}/NOTICE +0 -0
- {rasa_pro-3.12.0.dev2.dist-info → rasa_pro-3.12.0.dev4.dist-info}/WHEEL +0 -0
- {rasa_pro-3.12.0.dev2.dist-info → rasa_pro-3.12.0.dev4.dist-info}/entry_points.txt +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{l as Y,U as D,i as M}from"./index-
|
|
1
|
+
import{l as Y,U as D,i as M}from"./index-e793d777.js";var O=function(){var a=function(u,t,e,n){for(e=e||{},n=u.length;n--;e[u[n]]=t);return e},f=[6,9,10],m={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,e,n,s,r,i,d){switch(i.length-1,r){case 1:return s;case 4:break;case 6:s.setInfo(!0);break}},table:[{3:1,4:[1,2]},{1:[3]},a(f,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},a(f,[2,3]),a(f,[2,4]),a(f,[2,5]),a(f,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(e.recoverable)this.trace(t);else{var n=new Error(t);throw n.hash=e,n}},parse:function(t){var e=this,n=[0],s=[],r=[null],i=[],d=this.table,P="",v=0,L=0,N=2,T=1,R=i.slice.call(arguments,1),o=Object.create(this.lexer),p={yy:{}};for(var E in this.yy)Object.prototype.hasOwnProperty.call(this.yy,E)&&(p.yy[E]=this.yy[E]);o.setInput(t,p.yy),p.yy.lexer=o,p.yy.parser=this,typeof o.yylloc>"u"&&(o.yylloc={});var I=o.yylloc;i.push(I);var z=o.options&&o.options.ranges;typeof p.yy.parseError=="function"?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function U(){var y;return y=s.pop()||o.lex()||T,typeof y!="number"&&(y instanceof Array&&(s=y,y=s.pop()),y=e.symbols_[y]||y),y}for(var l,g,h,w,_={},b,c,F,S;;){if(g=n[n.length-1],this.defaultActions[g]?h=this.defaultActions[g]:((l===null||typeof l>"u")&&(l=U()),h=d[g]&&d[g][l]),typeof h>"u"||!h.length||!h[0]){var A="";S=[];for(b in d[g])this.terminals_[b]&&b>N&&S.push("'"+this.terminals_[b]+"'");o.showPosition?A="Parse error on line "+(v+1)+`:
|
|
2
2
|
`+o.showPosition()+`
|
|
3
3
|
Expecting `+S.join(", ")+", got '"+(this.terminals_[l]||l)+"'":A="Parse error on line "+(v+1)+": Unexpected "+(l==T?"end of input":"'"+(this.terminals_[l]||l)+"'"),this.parseError(A,{text:o.match,token:this.terminals_[l]||l,line:o.yylineno,loc:I,expected:S})}if(h[0]instanceof Array&&h.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+l);switch(h[0]){case 1:n.push(l),r.push(o.yytext),i.push(o.yylloc),n.push(h[1]),l=null,L=o.yyleng,P=o.yytext,v=o.yylineno,I=o.yylloc;break;case 2:if(c=this.productions_[h[1]][1],_.$=r[r.length-c],_._$={first_line:i[i.length-(c||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(c||1)].first_column,last_column:i[i.length-1].last_column},z&&(_._$.range=[i[i.length-(c||1)].range[0],i[i.length-1].range[1]]),w=this.performAction.apply(_,[P,L,v,p.yy,h[1],r,i].concat(R)),typeof w<"u")return w;c&&(n=n.slice(0,-1*c*2),r=r.slice(0,-1*c),i=i.slice(0,-1*c)),n.push(this.productions_[h[1]][0]),r.push(_.$),i.push(_._$),F=d[n[n.length-2]][n[n.length-1]],n.push(F);break;case 3:return!0}}return!0}},k=function(){var u={EOF:1,parseError:function(e,n){if(this.yy.parser)this.yy.parser.parseError(e,n);else throw new Error(e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===s.length?this.yylloc.first_column:0)+s[s.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as I,B as yt,D as ft,s as dt,g as pt,b as gt,a as mt,E as xt,h as W,i as kt}from"./index-
|
|
1
|
+
import{c as I,B as yt,D as ft,s as dt,g as pt,b as gt,a as mt,E as xt,h as W,i as kt}from"./index-e793d777.js";import{d as _t,f as bt,a as vt,g as it}from"./svgDrawCommon-4835440b-151251e9.js";import{a as Q}from"./arc-632a63ec.js";import"./path-53f90ab3.js";var G=function(){var t=function(p,s,r,a){for(r=r||{},a=p.length;a--;r[p[a]]=s);return r},e=[6,8,10,11,12,14,16,17,18],i=[1,9],l=[1,10],n=[1,11],h=[1,12],c=[1,13],f=[1,14],y={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:function(s,r,a,u,d,o,w){var k=o.length-1;switch(d){case 1:return o[k-1];case 2:this.$=[];break;case 3:o[k-1].push(o[k]),this.$=o[k-1];break;case 4:case 5:this.$=o[k];break;case 6:case 7:this.$=[];break;case 8:u.setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 9:this.$=o[k].trim(),u.setAccTitle(this.$);break;case 10:case 11:this.$=o[k].trim(),u.setAccDescription(this.$);break;case 12:u.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 13:u.addTask(o[k-1],o[k]),this.$="task";break}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:i,12:l,14:n,16:h,17:c,18:f},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:i,12:l,14:n,16:h,17:c,18:f},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:function(s,r){if(r.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=r,a}},parse:function(s){var r=this,a=[0],u=[],d=[null],o=[],w=this.table,k="",R=0,Z=0,lt=2,J=1,ct=o.slice.call(arguments,1),x=Object.create(this.lexer),S={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(S.yy[z]=this.yy[z]);x.setInput(s,S.yy),S.yy.lexer=x,S.yy.parser=this,typeof x.yylloc>"u"&&(x.yylloc={});var Y=x.yylloc;o.push(Y);var ht=x.options&&x.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ut(){var T;return T=u.pop()||x.lex()||J,typeof T!="number"&&(T instanceof Array&&(u=T,T=u.pop()),T=r.symbols_[T]||T),T}for(var _,E,b,O,A={},N,$,K,B;;){if(E=a[a.length-1],this.defaultActions[E]?b=this.defaultActions[E]:((_===null||typeof _>"u")&&(_=ut()),b=w[E]&&w[E][_]),typeof b>"u"||!b.length||!b[0]){var q="";B=[];for(N in w[E])this.terminals_[N]&&N>lt&&B.push("'"+this.terminals_[N]+"'");x.showPosition?q="Parse error on line "+(R+1)+`:
|
|
2
2
|
`+x.showPosition()+`
|
|
3
3
|
Expecting `+B.join(", ")+", got '"+(this.terminals_[_]||_)+"'":q="Parse error on line "+(R+1)+": Unexpected "+(_==J?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(q,{text:x.match,token:this.terminals_[_]||_,line:x.yylineno,loc:Y,expected:B})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+_);switch(b[0]){case 1:a.push(_),d.push(x.yytext),o.push(x.yylloc),a.push(b[1]),_=null,Z=x.yyleng,k=x.yytext,R=x.yylineno,Y=x.yylloc;break;case 2:if($=this.productions_[b[1]][1],A.$=d[d.length-$],A._$={first_line:o[o.length-($||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-($||1)].first_column,last_column:o[o.length-1].last_column},ht&&(A._$.range=[o[o.length-($||1)].range[0],o[o.length-1].range[1]]),O=this.performAction.apply(A,[k,Z,R,S.yy,b[1],d,o].concat(ct)),typeof O<"u")return O;$&&(a=a.slice(0,-1*$*2),d=d.slice(0,-1*$),o=o.slice(0,-1*$)),a.push(this.productions_[b[1]][0]),d.push(A.$),o.push(A._$),K=w[a[a.length-2]][a[a.length-1]],a.push(K);break;case 3:return!0}}return!0}},m=function(){var p={EOF:1,parseError:function(r,a){if(this.yy.parser)this.yy.parser.parseError(r,a);else throw new Error(r)},setInput:function(s,r){return this.yy=r||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var r=s.match(/(?:\r\n?|\n).*/g);return r?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},unput:function(s){var r=s.length,a=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===u.length?this.yylloc.first_column:0)+u[u.length-a.length].length-a[0].length:this.yylloc.first_column-r},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-r]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(s){this.unput(this.match.slice(s))},pastInput:function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var s=this.pastInput(),r=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a8 as q,a9 as fr,aa as O,ab as x,ac as F,ad as fn,ae as dr,af as cr,ag as hr,ah as Te,ai as lr,aj as vr,ak as dn,al as X,am as gr,an as Le,ao as pr,ap as H,aq as an,ar as Cn,as as br,at as Ln,au as wr,av as mr,aw as U,ax as In,ay as _r,az as Ae,aA as Kn,aB as Er,aC as yr,aD as Ne,aE as V,aF as Oe,aG as xr,aH as Pn,aI as on,aJ as Tr,aK as bn,aL as Lr,aM as B,y as Xn,aN as Vn,aO as An}from"./index-37817b51.js";var Ar="[object Symbol]";function $(n){return typeof n=="symbol"||q(n)&&fr(n)==Ar}function R(n,e){for(var r=-1,t=n==null?0:n.length,i=Array(t);++r<t;)i[r]=e(n[r],r,n);return i}var Nr=1/0,Zn=O?O.prototype:void 0,Jn=Zn?Zn.toString:void 0;function Ce(n){if(typeof n=="string")return n;if(x(n))return R(n,Ce)+"";if($(n))return Jn?Jn.call(n):"";var e=n+"";return e=="0"&&1/n==-Nr?"-0":e}var Or=/\s/;function Cr(n){for(var e=n.length;e--&&Or.test(n.charAt(e)););return e}var Ir=/^\s+/;function Pr(n){return n&&n.slice(0,Cr(n)+1).replace(Ir,"")}var Qn=0/0,$r=/^[-+]0x[0-9a-f]+$/i,Sr=/^0b[01]+$/i,Mr=/^0o[0-7]+$/i,Rr=parseInt;function Fr(n){if(typeof n=="number")return n;if($(n))return Qn;if(F(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=F(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=Pr(n);var r=Sr.test(n);return r||Mr.test(n)?Rr(n.slice(2),r?2:8):$r.test(n)?Qn:+n}var zn=1/0,Dr=17976931348623157e292;function rn(n){if(!n)return n===0?n:0;if(n=Fr(n),n===zn||n===-zn){var e=n<0?-1:1;return e*Dr}return n===n?n:0}function kr(n){var e=rn(n),r=e%1;return e===e?r?e-r:e:0}function Gr(){}function Ie(n,e){for(var r=-1,t=n==null?0:n.length;++r<t&&e(n[r],r,n)!==!1;);return n}function Pe(n,e,r,t){for(var i=n.length,a=r+(t?1:-1);t?a--:++a<i;)if(e(n[a],a,n))return a;return-1}function Br(n){return n!==n}function Yr(n,e,r){for(var t=r-1,i=n.length;++t<i;)if(n[t]===e)return t;return-1}function Ur(n,e,r){return e===e?Yr(n,e,r):Pe(n,Br,r)}function qr(n,e){var r=n==null?0:n.length;return!!r&&Ur(n,e,0)>-1}function T(n){return fn(n)?dr(n):cr(n)}var Hr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jr=/^\w*$/;function $n(n,e){if(x(n))return!1;var r=typeof n;return r=="number"||r=="symbol"||r=="boolean"||n==null||$(n)?!0:jr.test(n)||!Hr.test(n)||e!=null&&n in Object(e)}var Wr=500;function Kr(n){var e=hr(n,function(t){return r.size===Wr&&r.clear(),t}),r=e.cache;return e}var Xr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Vr=/\\(\\)?/g,Zr=Kr(function(n){var e=[];return n.charCodeAt(0)===46&&e.push(""),n.replace(Xr,function(r,t,i,a){e.push(i?a.replace(Vr,"$1"):t||r)}),e});const Jr=Zr;function $e(n){return n==null?"":Ce(n)}function cn(n,e){return x(n)?n:$n(n,e)?[n]:Jr($e(n))}var Qr=1/0;function Z(n){if(typeof n=="string"||$(n))return n;var e=n+"";return e=="0"&&1/n==-Qr?"-0":e}function hn(n,e){e=cn(e,n);for(var r=0,t=e.length;n!=null&&r<t;)n=n[Z(e[r++])];return r&&r==t?n:void 0}function zr(n,e,r){var t=n==null?void 0:hn(n,e);return t===void 0?r:t}function Sn(n,e){for(var r=-1,t=e.length,i=n.length;++r<t;)n[i+r]=e[r];return n}var ne=O?O.isConcatSpreadable:void 0;function nt(n){return x(n)||Te(n)||!!(ne&&n&&n[ne])}function ln(n,e,r,t,i){var a=-1,o=n.length;for(r||(r=nt),i||(i=[]);++a<o;){var s=n[a];e>0&&r(s)?e>1?ln(s,e-1,r,t,i):Sn(i,s):t||(i[i.length]=s)}return i}function k(n){var e=n==null?0:n.length;return e?ln(n,1):[]}function et(n){return lr(vr(n,void 0,k),n+"")}function rt(n,e,r,t){var i=-1,a=n==null?0:n.length;for(t&&a&&(r=n[++i]);++i<a;)r=e(r,n[i],i,n);return r}function tt(n,e){return n&&dn(e,T(e),n)}function it(n,e){return n&&dn(e,X(e),n)}function Se(n,e){for(var r=-1,t=n==null?0:n.length,i=0,a=[];++r<t;){var o=n[r];e(o,r,n)&&(a[i++]=o)}return a}function Me(){return[]}var at=Object.prototype,ot=at.propertyIsEnumerable,ee=Object.getOwnPropertySymbols,st=ee?function(n){return n==null?[]:(n=Object(n),Se(ee(n),function(e){return ot.call(n,e)}))}:Me;const Mn=st;function ut(n,e){return dn(n,Mn(n),e)}var ft=Object.getOwnPropertySymbols,dt=ft?function(n){for(var e=[];n;)Sn(e,Mn(n)),n=gr(n);return e}:Me;const Re=dt;function ct(n,e){return dn(n,Re(n),e)}function Fe(n,e,r){var t=e(n);return x(n)?t:Sn(t,r(n))}function Nn(n){return Fe(n,T,Mn)}function ht(n){return Fe(n,X,Re)}var lt=Object.prototype,vt=lt.hasOwnProperty;function gt(n){var e=n.length,r=new n.constructor(e);return e&&typeof n[0]=="string"&&vt.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function pt(n,e){var r=e?Le(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.byteLength)}var bt=/\w*$/;function wt(n){var e=new n.constructor(n.source,bt.exec(n));return e.lastIndex=n.lastIndex,e}var re=O?O.prototype:void 0,te=re?re.valueOf:void 0;function mt(n){return te?Object(te.call(n)):{}}var _t="[object Boolean]",Et="[object Date]",yt="[object Map]",xt="[object Number]",Tt="[object RegExp]",Lt="[object Set]",At="[object String]",Nt="[object Symbol]",Ot="[object ArrayBuffer]",Ct="[object DataView]",It="[object Float32Array]",Pt="[object Float64Array]",$t="[object Int8Array]",St="[object Int16Array]",Mt="[object Int32Array]",Rt="[object Uint8Array]",Ft="[object Uint8ClampedArray]",Dt="[object Uint16Array]",kt="[object Uint32Array]";function Gt(n,e,r){var t=n.constructor;switch(e){case Ot:return Le(n);case _t:case Et:return new t(+n);case Ct:return pt(n,r);case It:case Pt:case $t:case St:case Mt:case Rt:case Ft:case Dt:case kt:return pr(n,r);case yt:return new t;case xt:case At:return new t(n);case Tt:return wt(n);case Lt:return new t;case Nt:return mt(n)}}var Bt="[object Map]";function Yt(n){return q(n)&&H(n)==Bt}var ie=an&&an.isMap,Ut=ie?Cn(ie):Yt;const qt=Ut;var Ht="[object Set]";function jt(n){return q(n)&&H(n)==Ht}var ae=an&&an.isSet,Wt=ae?Cn(ae):jt;const Kt=Wt;var Xt=1,Vt=2,Zt=4,De="[object Arguments]",Jt="[object Array]",Qt="[object Boolean]",zt="[object Date]",ni="[object Error]",ke="[object Function]",ei="[object GeneratorFunction]",ri="[object Map]",ti="[object Number]",Ge="[object Object]",ii="[object RegExp]",ai="[object Set]",oi="[object String]",si="[object Symbol]",ui="[object WeakMap]",fi="[object ArrayBuffer]",di="[object DataView]",ci="[object Float32Array]",hi="[object Float64Array]",li="[object Int8Array]",vi="[object Int16Array]",gi="[object Int32Array]",pi="[object Uint8Array]",bi="[object Uint8ClampedArray]",wi="[object Uint16Array]",mi="[object Uint32Array]",w={};w[De]=w[Jt]=w[fi]=w[di]=w[Qt]=w[zt]=w[ci]=w[hi]=w[li]=w[vi]=w[gi]=w[ri]=w[ti]=w[Ge]=w[ii]=w[ai]=w[oi]=w[si]=w[pi]=w[bi]=w[wi]=w[mi]=!0;w[ni]=w[ke]=w[ui]=!1;function tn(n,e,r,t,i,a){var o,s=e&Xt,u=e&Vt,f=e&Zt;if(r&&(o=i?r(n,t,i,a):r(n)),o!==void 0)return o;if(!F(n))return n;var d=x(n);if(d){if(o=gt(n),!s)return br(n,o)}else{var h=H(n),l=h==ke||h==ei;if(Ln(n))return wr(n,s);if(h==Ge||h==De||l&&!i){if(o=u||l?{}:mr(n),!s)return u?ct(n,it(o,n)):ut(n,tt(o,n))}else{if(!w[h])return i?n:{};o=Gt(n,h,s)}}a||(a=new U);var g=a.get(n);if(g)return g;a.set(n,o),Kt(n)?n.forEach(function(m){o.add(tn(m,e,r,m,n,a))}):qt(n)&&n.forEach(function(m,_){o.set(_,tn(m,e,r,_,n,a))});var v=f?u?ht:Nn:u?X:T,p=d?void 0:v(n);return Ie(p||n,function(m,_){p&&(_=m,m=n[_]),In(o,_,tn(m,e,r,_,n,a))}),o}var _i=1,Ei=4;function yi(n){return tn(n,_i|Ei)}var xi="__lodash_hash_undefined__";function Ti(n){return this.__data__.set(n,xi),this}function Li(n){return this.__data__.has(n)}function j(n){var e=-1,r=n==null?0:n.length;for(this.__data__=new _r;++e<r;)this.add(n[e])}j.prototype.add=j.prototype.push=Ti;j.prototype.has=Li;function Ai(n,e){for(var r=-1,t=n==null?0:n.length;++r<t;)if(e(n[r],r,n))return!0;return!1}function Be(n,e){return n.has(e)}var Ni=1,Oi=2;function Ye(n,e,r,t,i,a){var o=r&Ni,s=n.length,u=e.length;if(s!=u&&!(o&&u>s))return!1;var f=a.get(n),d=a.get(e);if(f&&d)return f==e&&d==n;var h=-1,l=!0,g=r&Oi?new j:void 0;for(a.set(n,e),a.set(e,n);++h<s;){var v=n[h],p=e[h];if(t)var m=o?t(p,v,h,e,n,a):t(v,p,h,n,e,a);if(m!==void 0){if(m)continue;l=!1;break}if(g){if(!Ai(e,function(_,I){if(!Be(g,I)&&(v===_||i(v,_,r,t,a)))return g.push(I)})){l=!1;break}}else if(!(v===p||i(v,p,r,t,a))){l=!1;break}}return a.delete(n),a.delete(e),l}function Ci(n){var e=-1,r=Array(n.size);return n.forEach(function(t,i){r[++e]=[i,t]}),r}function Rn(n){var e=-1,r=Array(n.size);return n.forEach(function(t){r[++e]=t}),r}var Ii=1,Pi=2,$i="[object Boolean]",Si="[object Date]",Mi="[object Error]",Ri="[object Map]",Fi="[object Number]",Di="[object RegExp]",ki="[object Set]",Gi="[object String]",Bi="[object Symbol]",Yi="[object ArrayBuffer]",Ui="[object DataView]",oe=O?O.prototype:void 0,wn=oe?oe.valueOf:void 0;function qi(n,e,r,t,i,a,o){switch(r){case Ui:if(n.byteLength!=e.byteLength||n.byteOffset!=e.byteOffset)return!1;n=n.buffer,e=e.buffer;case Yi:return!(n.byteLength!=e.byteLength||!a(new Kn(n),new Kn(e)));case $i:case Si:case Fi:return Ae(+n,+e);case Mi:return n.name==e.name&&n.message==e.message;case Di:case Gi:return n==e+"";case Ri:var s=Ci;case ki:var u=t&Ii;if(s||(s=Rn),n.size!=e.size&&!u)return!1;var f=o.get(n);if(f)return f==e;t|=Pi,o.set(n,e);var d=Ye(s(n),s(e),t,i,a,o);return o.delete(n),d;case Bi:if(wn)return wn.call(n)==wn.call(e)}return!1}var Hi=1,ji=Object.prototype,Wi=ji.hasOwnProperty;function Ki(n,e,r,t,i,a){var o=r&Hi,s=Nn(n),u=s.length,f=Nn(e),d=f.length;if(u!=d&&!o)return!1;for(var h=u;h--;){var l=s[h];if(!(o?l in e:Wi.call(e,l)))return!1}var g=a.get(n),v=a.get(e);if(g&&v)return g==e&&v==n;var p=!0;a.set(n,e),a.set(e,n);for(var m=o;++h<u;){l=s[h];var _=n[l],I=e[l];if(t)var Wn=o?t(I,_,l,e,n,a):t(_,I,l,n,e,a);if(!(Wn===void 0?_===I||i(_,I,r,t,a):Wn)){p=!1;break}m||(m=l=="constructor")}if(p&&!m){var z=n.constructor,nn=e.constructor;z!=nn&&"constructor"in n&&"constructor"in e&&!(typeof z=="function"&&z instanceof z&&typeof nn=="function"&&nn instanceof nn)&&(p=!1)}return a.delete(n),a.delete(e),p}var Xi=1,se="[object Arguments]",ue="[object Array]",en="[object Object]",Vi=Object.prototype,fe=Vi.hasOwnProperty;function Zi(n,e,r,t,i,a){var o=x(n),s=x(e),u=o?ue:H(n),f=s?ue:H(e);u=u==se?en:u,f=f==se?en:f;var d=u==en,h=f==en,l=u==f;if(l&&Ln(n)){if(!Ln(e))return!1;o=!0,d=!1}if(l&&!d)return a||(a=new U),o||Er(n)?Ye(n,e,r,t,i,a):qi(n,e,u,r,t,i,a);if(!(r&Xi)){var g=d&&fe.call(n,"__wrapped__"),v=h&&fe.call(e,"__wrapped__");if(g||v){var p=g?n.value():n,m=v?e.value():e;return a||(a=new U),i(p,m,r,t,a)}}return l?(a||(a=new U),Ki(n,e,r,t,i,a)):!1}function Fn(n,e,r,t,i){return n===e?!0:n==null||e==null||!q(n)&&!q(e)?n!==n&&e!==e:Zi(n,e,r,t,Fn,i)}var Ji=1,Qi=2;function zi(n,e,r,t){var i=r.length,a=i,o=!t;if(n==null)return!a;for(n=Object(n);i--;){var s=r[i];if(o&&s[2]?s[1]!==n[s[0]]:!(s[0]in n))return!1}for(;++i<a;){s=r[i];var u=s[0],f=n[u],d=s[1];if(o&&s[2]){if(f===void 0&&!(u in n))return!1}else{var h=new U;if(t)var l=t(f,d,u,n,e,h);if(!(l===void 0?Fn(d,f,Ji|Qi,t,h):l))return!1}}return!0}function Ue(n){return n===n&&!F(n)}function na(n){for(var e=T(n),r=e.length;r--;){var t=e[r],i=n[t];e[r]=[t,i,Ue(i)]}return e}function qe(n,e){return function(r){return r==null?!1:r[n]===e&&(e!==void 0||n in Object(r))}}function ea(n){var e=na(n);return e.length==1&&e[0][2]?qe(e[0][0],e[0][1]):function(r){return r===n||zi(r,n,e)}}function ra(n,e){return n!=null&&e in Object(n)}function He(n,e,r){e=cn(e,n);for(var t=-1,i=e.length,a=!1;++t<i;){var o=Z(e[t]);if(!(a=n!=null&&r(n,o)))break;n=n[o]}return a||++t!=i?a:(i=n==null?0:n.length,!!i&&yr(i)&&Ne(o,i)&&(x(n)||Te(n)))}function je(n,e){return n!=null&&He(n,e,ra)}var ta=1,ia=2;function aa(n,e){return $n(n)&&Ue(e)?qe(Z(n),e):function(r){var t=zr(r,n);return t===void 0&&t===e?je(r,n):Fn(e,t,ta|ia)}}function oa(n){return function(e){return e==null?void 0:e[n]}}function sa(n){return function(e){return hn(e,n)}}function ua(n){return $n(n)?oa(Z(n)):sa(n)}function C(n){return typeof n=="function"?n:n==null?V:typeof n=="object"?x(n)?aa(n[0],n[1]):ea(n):ua(n)}function Dn(n,e){return n&&Oe(n,e,T)}function fa(n,e){return function(r,t){if(r==null)return r;if(!fn(r))return n(r,t);for(var i=r.length,a=e?i:-1,o=Object(r);(e?a--:++a<i)&&t(o[a],a,o)!==!1;);return r}}var da=fa(Dn);const vn=da;var ca=function(){return xr.Date.now()};const de=ca;var We=Object.prototype,ha=We.hasOwnProperty,la=Pn(function(n,e){n=Object(n);var r=-1,t=e.length,i=t>2?e[2]:void 0;for(i&&on(e[0],e[1],i)&&(t=1);++r<t;)for(var a=e[r],o=X(a),s=-1,u=o.length;++s<u;){var f=o[s],d=n[f];(d===void 0||Ae(d,We[f])&&!ha.call(n,f))&&(n[f]=a[f])}return n});const va=la;function ga(n,e,r){for(var t=-1,i=n==null?0:n.length;++t<i;)if(r(e,n[t]))return!0;return!1}function sn(n){var e=n==null?0:n.length;return e?n[e-1]:void 0}function kn(n){return typeof n=="function"?n:V}function c(n,e){var r=x(n)?Ie:vn;return r(n,kn(e))}function pa(n,e){var r=[];return vn(n,function(t,i,a){e(t,i,a)&&r.push(t)}),r}function A(n,e){var r=x(n)?Se:pa;return r(n,C(e))}function ba(n){return function(e,r,t){var i=Object(e);if(!fn(e)){var a=C(r);e=T(e),r=function(s){return a(i[s],s,i)}}var o=n(e,r,t);return o>-1?i[a?e[o]:o]:void 0}}var wa=Math.max;function ma(n,e,r){var t=n==null?0:n.length;if(!t)return-1;var i=r==null?0:kr(r);return i<0&&(i=wa(t+i,0)),Pe(n,C(e),i)}var _a=ba(ma);const Gn=_a;function Ke(n,e){var r=-1,t=fn(n)?Array(n.length):[];return vn(n,function(i,a,o){t[++r]=e(i,a,o)}),t}function E(n,e){var r=x(n)?R:Ke;return r(n,C(e))}function Ea(n,e){return n==null?n:Oe(n,kn(e),X)}function ya(n,e){return n&&Dn(n,kn(e))}function xa(n,e){return n>e}var Ta=Object.prototype,La=Ta.hasOwnProperty;function Aa(n,e){return n!=null&&La.call(n,e)}function b(n,e){return n!=null&&He(n,e,Aa)}function Na(n,e){return R(e,function(r){return n[r]})}function N(n){return n==null?[]:Na(n,T(n))}function y(n){return n===void 0}function Xe(n,e){return n<e}function gn(n,e){var r={};return e=C(e),Dn(n,function(t,i,a){Tr(r,i,e(t,i,a))}),r}function Bn(n,e,r){for(var t=-1,i=n.length;++t<i;){var a=n[t],o=e(a);if(o!=null&&(s===void 0?o===o&&!$(o):r(o,s)))var s=o,u=a}return u}function S(n){return n&&n.length?Bn(n,V,xa):void 0}function W(n){return n&&n.length?Bn(n,V,Xe):void 0}function Yn(n,e){return n&&n.length?Bn(n,C(e),Xe):void 0}function Oa(n,e,r,t){if(!F(n))return n;e=cn(e,n);for(var i=-1,a=e.length,o=a-1,s=n;s!=null&&++i<a;){var u=Z(e[i]),f=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return n;if(i!=o){var d=s[u];f=t?t(d,u,s):void 0,f===void 0&&(f=F(d)?d:Ne(e[i+1])?[]:{})}In(s,u,f),s=s[u]}return n}function Ca(n,e,r){for(var t=-1,i=e.length,a={};++t<i;){var o=e[t],s=hn(n,o);r(s,o)&&Oa(a,cn(o,n),s)}return a}function Ia(n,e){var r=n.length;for(n.sort(e);r--;)n[r]=n[r].value;return n}function Pa(n,e){if(n!==e){var r=n!==void 0,t=n===null,i=n===n,a=$(n),o=e!==void 0,s=e===null,u=e===e,f=$(e);if(!s&&!f&&!a&&n>e||a&&o&&u&&!s&&!f||t&&o&&u||!r&&u||!i)return 1;if(!t&&!a&&!f&&n<e||f&&r&&i&&!t&&!a||s&&r&&i||!o&&i||!u)return-1}return 0}function $a(n,e,r){for(var t=-1,i=n.criteria,a=e.criteria,o=i.length,s=r.length;++t<o;){var u=Pa(i[t],a[t]);if(u){if(t>=s)return u;var f=r[t];return u*(f=="desc"?-1:1)}}return n.index-e.index}function Sa(n,e,r){e.length?e=R(e,function(a){return x(a)?function(o){return hn(o,a.length===1?a[0]:a)}:a}):e=[V];var t=-1;e=R(e,Cn(C));var i=Ke(n,function(a,o,s){var u=R(e,function(f){return f(a)});return{criteria:u,index:++t,value:a}});return Ia(i,function(a,o){return $a(a,o,r)})}function Ma(n,e){return Ca(n,e,function(r,t){return je(n,t)})}var Ra=et(function(n,e){return n==null?{}:Ma(n,e)});const un=Ra;var Fa=Math.ceil,Da=Math.max;function ka(n,e,r,t){for(var i=-1,a=Da(Fa((e-n)/(r||1)),0),o=Array(a);a--;)o[t?a:++i]=n,n+=r;return o}function Ga(n){return function(e,r,t){return t&&typeof t!="number"&&on(e,r,t)&&(r=t=void 0),e=rn(e),r===void 0?(r=e,e=0):r=rn(r),t=t===void 0?e<r?1:-1:rn(t),ka(e,r,t,n)}}var Ba=Ga();const D=Ba;function Ya(n,e,r,t,i){return i(n,function(a,o,s){r=t?(t=!1,a):e(r,a,o,s)}),r}function J(n,e,r){var t=x(n)?rt:Ya,i=arguments.length<3;return t(n,C(e),r,i,vn)}var Ua=Pn(function(n,e){if(n==null)return[];var r=e.length;return r>1&&on(n,e[0],e[1])?e=[]:r>2&&on(e[0],e[1],e[2])&&(e=[e[0]]),Sa(n,ln(e,1),[])});const Q=Ua;var qa=1/0,Ha=bn&&1/Rn(new bn([,-0]))[1]==qa?function(n){return new bn(n)}:Gr;const ja=Ha;var Wa=200;function Ka(n,e,r){var t=-1,i=qr,a=n.length,o=!0,s=[],u=s;if(r)o=!1,i=ga;else if(a>=Wa){var f=e?null:ja(n);if(f)return Rn(f);o=!1,i=Be,u=new j}else u=e?[]:s;n:for(;++t<a;){var d=n[t],h=e?e(d):d;if(d=r||d!==0?d:0,o&&h===h){for(var l=u.length;l--;)if(u[l]===h)continue n;e&&u.push(h),s.push(d)}else i(u,h,r)||(u!==s&&u.push(h),s.push(d))}return s}var Xa=Pn(function(n){return Ka(ln(n,1,Lr,!0))});const Va=Xa;var Za=0;function Un(n){var e=++Za;return $e(n)+e}function Ja(n,e,r){for(var t=-1,i=n.length,a=e.length,o={};++t<i;){var s=t<a?e[t]:void 0;r(o,n[t],s)}return o}function Qa(n,e){return Ja(n||[],e||[],In)}var za="\0",P="\0",ce="";class L{constructor(e={}){this._isDirected=b(e,"directed")?e.directed:!0,this._isMultigraph=b(e,"multigraph")?e.multigraph:!1,this._isCompound=b(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=B(void 0),this._defaultEdgeLabelFn=B(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[P]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return Xn(e)||(e=B(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return T(this._nodes)}sources(){var e=this;return A(this.nodes(),function(r){return Vn(e._in[r])})}sinks(){var e=this;return A(this.nodes(),function(r){return Vn(e._out[r])})}setNodes(e,r){var t=arguments,i=this;return c(e,function(a){t.length>1?i.setNode(a,r):i.setNode(a)}),this}setNode(e,r){return b(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=r),this):(this._nodes[e]=arguments.length>1?r:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=P,this._children[e]={},this._children[P][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return b(this._nodes,e)}removeNode(e){var r=this;if(b(this._nodes,e)){var t=function(i){r.removeEdge(r._edgeObjs[i])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],c(this.children(e),function(i){r.setParent(i)}),delete this._children[e]),c(T(this._in[e]),t),delete this._in[e],delete this._preds[e],c(T(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(y(r))r=P;else{r+="";for(var t=r;!y(t);t=this.parent(t))if(t===e)throw new Error("Setting "+r+" as parent of "+e+" would create a cycle");this.setNode(r)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=r,this._children[r][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var r=this._parent[e];if(r!==P)return r}}children(e){if(y(e)&&(e=P),this._isCompound){var r=this._children[e];if(r)return T(r)}else{if(e===P)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var r=this._preds[e];if(r)return T(r)}successors(e){var r=this._sucs[e];if(r)return T(r)}neighbors(e){var r=this.predecessors(e);if(r)return Va(r,this.successors(e))}isLeaf(e){var r;return this.isDirected()?r=this.successors(e):r=this.neighbors(e),r.length===0}filterNodes(e){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var t=this;c(this._nodes,function(o,s){e(s)&&r.setNode(s,o)}),c(this._edgeObjs,function(o){r.hasNode(o.v)&&r.hasNode(o.w)&&r.setEdge(o,t.edge(o))});var i={};function a(o){var s=t.parent(o);return s===void 0||r.hasNode(s)?(i[o]=s,s):s in i?i[s]:a(s)}return this._isCompound&&c(r.nodes(),function(o){r.setParent(o,a(o))}),r}setDefaultEdgeLabel(e){return Xn(e)||(e=B(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return N(this._edgeObjs)}setPath(e,r){var t=this,i=arguments;return J(e,function(a,o){return i.length>1?t.setEdge(a,o,r):t.setEdge(a,o),o}),this}setEdge(){var e,r,t,i,a=!1,o=arguments[0];typeof o=="object"&&o!==null&&"v"in o?(e=o.v,r=o.w,t=o.name,arguments.length===2&&(i=arguments[1],a=!0)):(e=o,r=arguments[1],t=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),e=""+e,r=""+r,y(t)||(t=""+t);var s=Y(this._isDirected,e,r,t);if(b(this._edgeLabels,s))return a&&(this._edgeLabels[s]=i),this;if(!y(t)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(r),this._edgeLabels[s]=a?i:this._defaultEdgeLabelFn(e,r,t);var u=no(this._isDirected,e,r,t);return e=u.v,r=u.w,Object.freeze(u),this._edgeObjs[s]=u,he(this._preds[r],e),he(this._sucs[e],r),this._in[r][s]=u,this._out[e][s]=u,this._edgeCount++,this}edge(e,r,t){var i=arguments.length===1?mn(this._isDirected,arguments[0]):Y(this._isDirected,e,r,t);return this._edgeLabels[i]}hasEdge(e,r,t){var i=arguments.length===1?mn(this._isDirected,arguments[0]):Y(this._isDirected,e,r,t);return b(this._edgeLabels,i)}removeEdge(e,r,t){var i=arguments.length===1?mn(this._isDirected,arguments[0]):Y(this._isDirected,e,r,t),a=this._edgeObjs[i];return a&&(e=a.v,r=a.w,delete this._edgeLabels[i],delete this._edgeObjs[i],le(this._preds[r],e),le(this._sucs[e],r),delete this._in[r][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,r){var t=this._in[e];if(t){var i=N(t);return r?A(i,function(a){return a.v===r}):i}}outEdges(e,r){var t=this._out[e];if(t){var i=N(t);return r?A(i,function(a){return a.w===r}):i}}nodeEdges(e,r){var t=this.inEdges(e,r);if(t)return t.concat(this.outEdges(e,r))}}L.prototype._nodeCount=0;L.prototype._edgeCount=0;function he(n,e){n[e]?n[e]++:n[e]=1}function le(n,e){--n[e]||delete n[e]}function Y(n,e,r,t){var i=""+e,a=""+r;if(!n&&i>a){var o=i;i=a,a=o}return i+ce+a+ce+(y(t)?za:t)}function no(n,e,r,t){var i=""+e,a=""+r;if(!n&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return t&&(s.name=t),s}function mn(n,e){return Y(n,e.v,e.w,e.name)}class eo{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,r=e._prev;if(r!==e)return ve(r),r}enqueue(e){var r=this._sentinel;e._prev&&e._next&&ve(e),e._next=r._next,r._next._prev=e,r._next=e,e._prev=r}toString(){for(var e=[],r=this._sentinel,t=r._prev;t!==r;)e.push(JSON.stringify(t,ro)),t=t._prev;return"["+e.join(", ")+"]"}}function ve(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function ro(n,e){if(n!=="_next"&&n!=="_prev")return e}var to=B(1);function io(n,e){if(n.nodeCount()<=1)return[];var r=oo(n,e||to),t=ao(r.graph,r.buckets,r.zeroIdx);return k(E(t,function(i){return n.outEdges(i.v,i.w)}))}function ao(n,e,r){for(var t=[],i=e[e.length-1],a=e[0],o;n.nodeCount();){for(;o=a.dequeue();)_n(n,e,r,o);for(;o=i.dequeue();)_n(n,e,r,o);if(n.nodeCount()){for(var s=e.length-2;s>0;--s)if(o=e[s].dequeue(),o){t=t.concat(_n(n,e,r,o,!0));break}}}return t}function _n(n,e,r,t,i){var a=i?[]:void 0;return c(n.inEdges(t.v),function(o){var s=n.edge(o),u=n.node(o.v);i&&a.push({v:o.v,w:o.w}),u.out-=s,On(e,r,u)}),c(n.outEdges(t.v),function(o){var s=n.edge(o),u=o.w,f=n.node(u);f.in-=s,On(e,r,f)}),n.removeNode(t.v),a}function oo(n,e){var r=new L,t=0,i=0;c(n.nodes(),function(s){r.setNode(s,{v:s,in:0,out:0})}),c(n.edges(),function(s){var u=r.edge(s.v,s.w)||0,f=e(s),d=u+f;r.setEdge(s.v,s.w,d),i=Math.max(i,r.node(s.v).out+=f),t=Math.max(t,r.node(s.w).in+=f)});var a=D(i+t+3).map(function(){return new eo}),o=t+1;return c(r.nodes(),function(s){On(a,o,r.node(s))}),{graph:r,buckets:a,zeroIdx:o}}function On(n,e,r){r.out?r.in?n[r.out-r.in+e].enqueue(r):n[n.length-1].enqueue(r):n[0].enqueue(r)}function so(n){var e=n.graph().acyclicer==="greedy"?io(n,r(n)):uo(n);c(e,function(t){var i=n.edge(t);n.removeEdge(t),i.forwardName=t.name,i.reversed=!0,n.setEdge(t.w,t.v,i,Un("rev"))});function r(t){return function(i){return t.edge(i).weight}}}function uo(n){var e=[],r={},t={};function i(a){b(t,a)||(t[a]=!0,r[a]=!0,c(n.outEdges(a),function(o){b(r,o.w)?e.push(o):i(o.w)}),delete r[a])}return c(n.nodes(),i),e}function fo(n){c(n.edges(),function(e){var r=n.edge(e);if(r.reversed){n.removeEdge(e);var t=r.forwardName;delete r.reversed,delete r.forwardName,n.setEdge(e.w,e.v,r,t)}})}function G(n,e,r,t){var i;do i=Un(t);while(n.hasNode(i));return r.dummy=e,n.setNode(i,r),i}function co(n){var e=new L().setGraph(n.graph());return c(n.nodes(),function(r){e.setNode(r,n.node(r))}),c(n.edges(),function(r){var t=e.edge(r.v,r.w)||{weight:0,minlen:1},i=n.edge(r);e.setEdge(r.v,r.w,{weight:t.weight+i.weight,minlen:Math.max(t.minlen,i.minlen)})}),e}function Ve(n){var e=new L({multigraph:n.isMultigraph()}).setGraph(n.graph());return c(n.nodes(),function(r){n.children(r).length||e.setNode(r,n.node(r))}),c(n.edges(),function(r){e.setEdge(r,n.edge(r))}),e}function ge(n,e){var r=n.x,t=n.y,i=e.x-r,a=e.y-t,o=n.width/2,s=n.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var u,f;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),u=s*i/a,f=s):(i<0&&(o=-o),u=o,f=o*a/i),{x:r+u,y:t+f}}function pn(n){var e=E(D(Ze(n)+1),function(){return[]});return c(n.nodes(),function(r){var t=n.node(r),i=t.rank;y(i)||(e[i][t.order]=r)}),e}function ho(n){var e=W(E(n.nodes(),function(r){return n.node(r).rank}));c(n.nodes(),function(r){var t=n.node(r);b(t,"rank")&&(t.rank-=e)})}function lo(n){var e=W(E(n.nodes(),function(a){return n.node(a).rank})),r=[];c(n.nodes(),function(a){var o=n.node(a).rank-e;r[o]||(r[o]=[]),r[o].push(a)});var t=0,i=n.graph().nodeRankFactor;c(r,function(a,o){y(a)&&o%i!==0?--t:t&&c(a,function(s){n.node(s).rank+=t})})}function pe(n,e,r,t){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=t),G(n,"border",i,e)}function Ze(n){return S(E(n.nodes(),function(e){var r=n.node(e).rank;if(!y(r))return r}))}function vo(n,e){var r={lhs:[],rhs:[]};return c(n,function(t){e(t)?r.lhs.push(t):r.rhs.push(t)}),r}function go(n,e){var r=de();try{return e()}finally{console.log(n+" time: "+(de()-r)+"ms")}}function po(n,e){return e()}function bo(n){function e(r){var t=n.children(r),i=n.node(r);if(t.length&&c(t,e),b(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;a<o;++a)be(n,"borderLeft","_bl",r,i,a),be(n,"borderRight","_br",r,i,a)}}c(n.children(),e)}function be(n,e,r,t,i,a){var o={width:0,height:0,rank:a,borderType:e},s=i[e][a-1],u=G(n,"border",o,r);i[e][a]=u,n.setParent(u,t),s&&n.setEdge(s,u,{weight:1})}function wo(n){var e=n.graph().rankdir.toLowerCase();(e==="lr"||e==="rl")&&Je(n)}function mo(n){var e=n.graph().rankdir.toLowerCase();(e==="bt"||e==="rl")&&_o(n),(e==="lr"||e==="rl")&&(Eo(n),Je(n))}function Je(n){c(n.nodes(),function(e){we(n.node(e))}),c(n.edges(),function(e){we(n.edge(e))})}function we(n){var e=n.width;n.width=n.height,n.height=e}function _o(n){c(n.nodes(),function(e){En(n.node(e))}),c(n.edges(),function(e){var r=n.edge(e);c(r.points,En),b(r,"y")&&En(r)})}function En(n){n.y=-n.y}function Eo(n){c(n.nodes(),function(e){yn(n.node(e))}),c(n.edges(),function(e){var r=n.edge(e);c(r.points,yn),b(r,"x")&&yn(r)})}function yn(n){var e=n.x;n.x=n.y,n.y=e}function yo(n){n.graph().dummyChains=[],c(n.edges(),function(e){xo(n,e)})}function xo(n,e){var r=e.v,t=n.node(r).rank,i=e.w,a=n.node(i).rank,o=e.name,s=n.edge(e),u=s.labelRank;if(a!==t+1){n.removeEdge(e);var f,d,h;for(h=0,++t;t<a;++h,++t)s.points=[],d={width:0,height:0,edgeLabel:s,edgeObj:e,rank:t},f=G(n,"edge",d,"_d"),t===u&&(d.width=s.width,d.height=s.height,d.dummy="edge-label",d.labelpos=s.labelpos),n.setEdge(r,f,{weight:s.weight},o),h===0&&n.graph().dummyChains.push(f),r=f;n.setEdge(r,i,{weight:s.weight},o)}}function To(n){c(n.graph().dummyChains,function(e){var r=n.node(e),t=r.edgeLabel,i;for(n.setEdge(r.edgeObj,t);r.dummy;)i=n.successors(e)[0],n.removeNode(e),t.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height),e=i,r=n.node(e)})}function qn(n){var e={};function r(t){var i=n.node(t);if(b(e,t))return i.rank;e[t]=!0;var a=W(E(n.outEdges(t),function(o){return r(o.w)-n.edge(o).minlen}));return(a===Number.POSITIVE_INFINITY||a===void 0||a===null)&&(a=0),i.rank=a}c(n.sources(),r)}function K(n,e){return n.node(e.w).rank-n.node(e.v).rank-n.edge(e).minlen}function Qe(n){var e=new L({directed:!1}),r=n.nodes()[0],t=n.nodeCount();e.setNode(r,{});for(var i,a;Lo(e,n)<t;)i=Ao(e,n),a=e.hasNode(i.v)?K(n,i):-K(n,i),No(e,n,a);return e}function Lo(n,e){function r(t){c(e.nodeEdges(t),function(i){var a=i.v,o=t===a?i.w:a;!n.hasNode(o)&&!K(e,i)&&(n.setNode(o,{}),n.setEdge(t,o,{}),r(o))})}return c(n.nodes(),r),n.nodeCount()}function Ao(n,e){return Yn(e.edges(),function(r){if(n.hasNode(r.v)!==n.hasNode(r.w))return K(e,r)})}function No(n,e,r){c(n.nodes(),function(t){e.node(t).rank+=r})}function Oo(){}Oo.prototype=new Error;function ze(n,e,r){x(e)||(e=[e]);var t=(n.isDirected()?n.successors:n.neighbors).bind(n),i=[],a={};return c(e,function(o){if(!n.hasNode(o))throw new Error("Graph does not have node: "+o);nr(n,o,r==="post",a,t,i)}),i}function nr(n,e,r,t,i,a){b(t,e)||(t[e]=!0,r||a.push(e),c(i(e),function(o){nr(n,o,r,t,i,a)}),r&&a.push(e))}function Co(n,e){return ze(n,e,"post")}function Io(n,e){return ze(n,e,"pre")}M.initLowLimValues=jn;M.initCutValues=Hn;M.calcCutValue=er;M.leaveEdge=tr;M.enterEdge=ir;M.exchangeEdges=ar;function M(n){n=co(n),qn(n);var e=Qe(n);jn(e),Hn(e,n);for(var r,t;r=tr(e);)t=ir(e,n,r),ar(e,n,r,t)}function Hn(n,e){var r=Co(n,n.nodes());r=r.slice(0,r.length-1),c(r,function(t){Po(n,e,t)})}function Po(n,e,r){var t=n.node(r),i=t.parent;n.edge(r,i).cutvalue=er(n,e,r)}function er(n,e,r){var t=n.node(r),i=t.parent,a=!0,o=e.edge(r,i),s=0;return o||(a=!1,o=e.edge(i,r)),s=o.weight,c(e.nodeEdges(r),function(u){var f=u.v===r,d=f?u.w:u.v;if(d!==i){var h=f===a,l=e.edge(u).weight;if(s+=h?l:-l,So(n,r,d)){var g=n.edge(r,d).cutvalue;s+=h?-g:g}}}),s}function jn(n,e){arguments.length<2&&(e=n.nodes()[0]),rr(n,{},1,e)}function rr(n,e,r,t,i){var a=r,o=n.node(t);return e[t]=!0,c(n.neighbors(t),function(s){b(e,s)||(r=rr(n,e,r,s,t))}),o.low=a,o.lim=r++,i?o.parent=i:delete o.parent,r}function tr(n){return Gn(n.edges(),function(e){return n.edge(e).cutvalue<0})}function ir(n,e,r){var t=r.v,i=r.w;e.hasEdge(t,i)||(t=r.w,i=r.v);var a=n.node(t),o=n.node(i),s=a,u=!1;a.lim>o.lim&&(s=o,u=!0);var f=A(e.edges(),function(d){return u===me(n,n.node(d.v),s)&&u!==me(n,n.node(d.w),s)});return Yn(f,function(d){return K(e,d)})}function ar(n,e,r,t){var i=r.v,a=r.w;n.removeEdge(i,a),n.setEdge(t.v,t.w,{}),jn(n),Hn(n,e),$o(n,e)}function $o(n,e){var r=Gn(n.nodes(),function(i){return!e.node(i).parent}),t=Io(n,r);t=t.slice(1),c(t,function(i){var a=n.node(i).parent,o=e.edge(i,a),s=!1;o||(o=e.edge(a,i),s=!0),e.node(i).rank=e.node(a).rank+(s?o.minlen:-o.minlen)})}function So(n,e,r){return n.hasEdge(e,r)}function me(n,e,r){return r.low<=e.lim&&e.lim<=r.lim}function Mo(n){switch(n.graph().ranker){case"network-simplex":_e(n);break;case"tight-tree":Fo(n);break;case"longest-path":Ro(n);break;default:_e(n)}}var Ro=qn;function Fo(n){qn(n),Qe(n)}function _e(n){M(n)}function Do(n){var e=G(n,"root",{},"_root"),r=ko(n),t=S(N(r))-1,i=2*t+1;n.graph().nestingRoot=e,c(n.edges(),function(o){n.edge(o).minlen*=i});var a=Go(n)+1;c(n.children(),function(o){or(n,e,i,a,t,r,o)}),n.graph().nodeRankFactor=i}function or(n,e,r,t,i,a,o){var s=n.children(o);if(!s.length){o!==e&&n.setEdge(e,o,{weight:0,minlen:r});return}var u=pe(n,"_bt"),f=pe(n,"_bb"),d=n.node(o);n.setParent(u,o),d.borderTop=u,n.setParent(f,o),d.borderBottom=f,c(s,function(h){or(n,e,r,t,i,a,h);var l=n.node(h),g=l.borderTop?l.borderTop:h,v=l.borderBottom?l.borderBottom:h,p=l.borderTop?t:2*t,m=g!==v?1:i-a[o]+1;n.setEdge(u,g,{weight:p,minlen:m,nestingEdge:!0}),n.setEdge(v,f,{weight:p,minlen:m,nestingEdge:!0})}),n.parent(o)||n.setEdge(e,u,{weight:0,minlen:i+a[o]})}function ko(n){var e={};function r(t,i){var a=n.children(t);a&&a.length&&c(a,function(o){r(o,i+1)}),e[t]=i}return c(n.children(),function(t){r(t,1)}),e}function Go(n){return J(n.edges(),function(e,r){return e+n.edge(r).weight},0)}function Bo(n){var e=n.graph();n.removeNode(e.nestingRoot),delete e.nestingRoot,c(n.edges(),function(r){var t=n.edge(r);t.nestingEdge&&n.removeEdge(r)})}function Yo(n,e,r){var t={},i;c(r,function(a){for(var o=n.parent(a),s,u;o;){if(s=n.parent(o),s?(u=t[s],t[s]=o):(u=i,i=o),u&&u!==o){e.setEdge(u,o);return}o=s}})}function Uo(n,e,r){var t=qo(n),i=new L({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(a){return n.node(a)});return c(n.nodes(),function(a){var o=n.node(a),s=n.parent(a);(o.rank===e||o.minRank<=e&&e<=o.maxRank)&&(i.setNode(a),i.setParent(a,s||t),c(n[r](a),function(u){var f=u.v===a?u.w:u.v,d=i.edge(f,a),h=y(d)?0:d.weight;i.setEdge(f,a,{weight:n.edge(u).weight+h})}),b(o,"minRank")&&i.setNode(a,{borderLeft:o.borderLeft[e],borderRight:o.borderRight[e]}))}),i}function qo(n){for(var e;n.hasNode(e=Un("_root")););return e}function Ho(n,e){for(var r=0,t=1;t<e.length;++t)r+=jo(n,e[t-1],e[t]);return r}function jo(n,e,r){for(var t=Qa(r,E(r,function(f,d){return d})),i=k(E(e,function(f){return Q(E(n.outEdges(f),function(d){return{pos:t[d.w],weight:n.edge(d).weight}}),"pos")})),a=1;a<r.length;)a<<=1;var o=2*a-1;a-=1;var s=E(new Array(o),function(){return 0}),u=0;return c(i.forEach(function(f){var d=f.pos+a;s[d]+=f.weight;for(var h=0;d>0;)d%2&&(h+=s[d+1]),d=d-1>>1,s[d]+=f.weight;u+=f.weight*h})),u}function Wo(n){var e={},r=A(n.nodes(),function(s){return!n.children(s).length}),t=S(E(r,function(s){return n.node(s).rank})),i=E(D(t+1),function(){return[]});function a(s){if(!b(e,s)){e[s]=!0;var u=n.node(s);i[u.rank].push(s),c(n.successors(s),a)}}var o=Q(r,function(s){return n.node(s).rank});return c(o,a),i}function Ko(n,e){return E(e,function(r){var t=n.inEdges(r);if(t.length){var i=J(t,function(a,o){var s=n.edge(o),u=n.node(o.v);return{sum:a.sum+s.weight*u.order,weight:a.weight+s.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}function Xo(n,e){var r={};c(n,function(i,a){var o=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:a};y(i.barycenter)||(o.barycenter=i.barycenter,o.weight=i.weight)}),c(e.edges(),function(i){var a=r[i.v],o=r[i.w];!y(a)&&!y(o)&&(o.indegree++,a.out.push(r[i.w]))});var t=A(r,function(i){return!i.indegree});return Vo(t)}function Vo(n){var e=[];function r(a){return function(o){o.merged||(y(o.barycenter)||y(a.barycenter)||o.barycenter>=a.barycenter)&&Zo(a,o)}}function t(a){return function(o){o.in.push(a),--o.indegree===0&&n.push(o)}}for(;n.length;){var i=n.pop();e.push(i),c(i.in.reverse(),r(i)),c(i.out,t(i))}return E(A(e,function(a){return!a.merged}),function(a){return un(a,["vs","i","barycenter","weight"])})}function Zo(n,e){var r=0,t=0;n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.vs=e.vs.concat(n.vs),n.barycenter=r/t,n.weight=t,n.i=Math.min(e.i,n.i),e.merged=!0}function Jo(n,e){var r=vo(n,function(d){return b(d,"barycenter")}),t=r.lhs,i=Q(r.rhs,function(d){return-d.i}),a=[],o=0,s=0,u=0;t.sort(Qo(!!e)),u=Ee(a,i,u),c(t,function(d){u+=d.vs.length,a.push(d.vs),o+=d.barycenter*d.weight,s+=d.weight,u=Ee(a,i,u)});var f={vs:k(a)};return s&&(f.barycenter=o/s,f.weight=s),f}function Ee(n,e,r){for(var t;e.length&&(t=sn(e)).i<=r;)e.pop(),n.push(t.vs),r++;return r}function Qo(n){return function(e,r){return e.barycenter<r.barycenter?-1:e.barycenter>r.barycenter?1:n?r.i-e.i:e.i-r.i}}function sr(n,e,r,t){var i=n.children(e),a=n.node(e),o=a?a.borderLeft:void 0,s=a?a.borderRight:void 0,u={};o&&(i=A(i,function(v){return v!==o&&v!==s}));var f=Ko(n,i);c(f,function(v){if(n.children(v.v).length){var p=sr(n,v.v,r,t);u[v.v]=p,b(p,"barycenter")&&ns(v,p)}});var d=Xo(f,r);zo(d,u);var h=Jo(d,t);if(o&&(h.vs=k([o,h.vs,s]),n.predecessors(o).length)){var l=n.node(n.predecessors(o)[0]),g=n.node(n.predecessors(s)[0]);b(h,"barycenter")||(h.barycenter=0,h.weight=0),h.barycenter=(h.barycenter*h.weight+l.order+g.order)/(h.weight+2),h.weight+=2}return h}function zo(n,e){c(n,function(r){r.vs=k(r.vs.map(function(t){return e[t]?e[t].vs:t}))})}function ns(n,e){y(n.barycenter)?(n.barycenter=e.barycenter,n.weight=e.weight):(n.barycenter=(n.barycenter*n.weight+e.barycenter*e.weight)/(n.weight+e.weight),n.weight+=e.weight)}function es(n){var e=Ze(n),r=ye(n,D(1,e+1),"inEdges"),t=ye(n,D(e-1,-1,-1),"outEdges"),i=Wo(n);xe(n,i);for(var a=Number.POSITIVE_INFINITY,o,s=0,u=0;u<4;++s,++u){rs(s%2?r:t,s%4>=2),i=pn(n);var f=Ho(n,i);f<a&&(u=0,o=yi(i),a=f)}xe(n,o)}function ye(n,e,r){return E(e,function(t){return Uo(n,t,r)})}function rs(n,e){var r=new L;c(n,function(t){var i=t.graph().root,a=sr(t,i,r,e);c(a.vs,function(o,s){t.node(o).order=s}),Yo(t,r,a.vs)})}function xe(n,e){c(e,function(r){c(r,function(t,i){n.node(t).order=i})})}function ts(n){var e=as(n);c(n.graph().dummyChains,function(r){for(var t=n.node(r),i=t.edgeObj,a=is(n,e,i.v,i.w),o=a.path,s=a.lca,u=0,f=o[u],d=!0;r!==i.w;){if(t=n.node(r),d){for(;(f=o[u])!==s&&n.node(f).maxRank<t.rank;)u++;f===s&&(d=!1)}if(!d){for(;u<o.length-1&&n.node(f=o[u+1]).minRank<=t.rank;)u++;f=o[u]}n.setParent(r,f),r=n.successors(r)[0]}})}function is(n,e,r,t){var i=[],a=[],o=Math.min(e[r].low,e[t].low),s=Math.max(e[r].lim,e[t].lim),u,f;u=r;do u=n.parent(u),i.push(u);while(u&&(e[u].low>o||s>e[u].lim));for(f=u,u=t;(u=n.parent(u))!==f;)a.push(u);return{path:i.concat(a.reverse()),lca:f}}function as(n){var e={},r=0;function t(i){var a=r;c(n.children(i),t),e[i]={low:a,lim:r++}}return c(n.children(),t),e}function os(n,e){var r={};function t(i,a){var o=0,s=0,u=i.length,f=sn(a);return c(a,function(d,h){var l=us(n,d),g=l?n.node(l).order:u;(l||d===f)&&(c(a.slice(s,h+1),function(v){c(n.predecessors(v),function(p){var m=n.node(p),_=m.order;(_<o||g<_)&&!(m.dummy&&n.node(v).dummy)&&ur(r,p,v)})}),s=h+1,o=g)}),a}return J(e,t),r}function ss(n,e){var r={};function t(a,o,s,u,f){var d;c(D(o,s),function(h){d=a[h],n.node(d).dummy&&c(n.predecessors(d),function(l){var g=n.node(l);g.dummy&&(g.order<u||g.order>f)&&ur(r,l,d)})})}function i(a,o){var s=-1,u,f=0;return c(o,function(d,h){if(n.node(d).dummy==="border"){var l=n.predecessors(d);l.length&&(u=n.node(l[0]).order,t(o,f,h,s,u),f=h,s=u)}t(o,f,o.length,u,a.length)}),o}return J(e,i),r}function us(n,e){if(n.node(e).dummy)return Gn(n.predecessors(e),function(r){return n.node(r).dummy})}function ur(n,e,r){if(e>r){var t=e;e=r,r=t}var i=n[e];i||(n[e]=i={}),i[r]=!0}function fs(n,e,r){if(e>r){var t=e;e=r,r=t}return b(n[e],r)}function ds(n,e,r,t){var i={},a={},o={};return c(e,function(s){c(s,function(u,f){i[u]=u,a[u]=u,o[u]=f})}),c(e,function(s){var u=-1;c(s,function(f){var d=t(f);if(d.length){d=Q(d,function(p){return o[p]});for(var h=(d.length-1)/2,l=Math.floor(h),g=Math.ceil(h);l<=g;++l){var v=d[l];a[f]===f&&u<o[v]&&!fs(r,f,v)&&(a[v]=f,a[f]=i[f]=i[v],u=o[v])}}})}),{root:i,align:a}}function cs(n,e,r,t,i){var a={},o=hs(n,e,r,i),s=i?"borderLeft":"borderRight";function u(h,l){for(var g=o.nodes(),v=g.pop(),p={};v;)p[v]?h(v):(p[v]=!0,g.push(v),g=g.concat(l(v))),v=g.pop()}function f(h){a[h]=o.inEdges(h).reduce(function(l,g){return Math.max(l,a[g.v]+o.edge(g))},0)}function d(h){var l=o.outEdges(h).reduce(function(v,p){return Math.min(v,a[p.w]-o.edge(p))},Number.POSITIVE_INFINITY),g=n.node(h);l!==Number.POSITIVE_INFINITY&&g.borderType!==s&&(a[h]=Math.max(a[h],l))}return u(f,o.predecessors.bind(o)),u(d,o.successors.bind(o)),c(t,function(h){a[h]=a[r[h]]}),a}function hs(n,e,r,t){var i=new L,a=n.graph(),o=bs(a.nodesep,a.edgesep,t);return c(e,function(s){var u;c(s,function(f){var d=r[f];if(i.setNode(d),u){var h=r[u],l=i.edge(h,d);i.setEdge(h,d,Math.max(o(n,f,u),l||0))}u=f})}),i}function ls(n,e){return Yn(N(e),function(r){var t=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return Ea(r,function(a,o){var s=ws(n,o)/2;t=Math.max(a+s,t),i=Math.min(a-s,i)}),t-i})}function vs(n,e){var r=N(e),t=W(r),i=S(r);c(["u","d"],function(a){c(["l","r"],function(o){var s=a+o,u=n[s],f;if(u!==e){var d=N(u);f=o==="l"?t-W(d):i-S(d),f&&(n[s]=gn(u,function(h){return h+f}))}})})}function gs(n,e){return gn(n.ul,function(r,t){if(e)return n[e.toLowerCase()][t];var i=Q(E(n,t));return(i[1]+i[2])/2})}function ps(n){var e=pn(n),r=An(os(n,e),ss(n,e)),t={},i;c(["u","d"],function(o){i=o==="u"?e:N(e).reverse(),c(["l","r"],function(s){s==="r"&&(i=E(i,function(h){return N(h).reverse()}));var u=(o==="u"?n.predecessors:n.successors).bind(n),f=ds(n,i,r,u),d=cs(n,i,f.root,f.align,s==="r");s==="r"&&(d=gn(d,function(h){return-h})),t[o+s]=d})});var a=ls(n,t);return vs(t,a),gs(t,n.graph().align)}function bs(n,e,r){return function(t,i,a){var o=t.node(i),s=t.node(a),u=0,f;if(u+=o.width/2,b(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":f=-o.width/2;break;case"r":f=o.width/2;break}if(f&&(u+=r?f:-f),f=0,u+=(o.dummy?e:n)/2,u+=(s.dummy?e:n)/2,u+=s.width/2,b(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":f=s.width/2;break;case"r":f=-s.width/2;break}return f&&(u+=r?f:-f),f=0,u}}function ws(n,e){return n.node(e).width}function ms(n){n=Ve(n),_s(n),ya(ps(n),function(e,r){n.node(r).x=e})}function _s(n){var e=pn(n),r=n.graph().ranksep,t=0;c(e,function(i){var a=S(E(i,function(o){return n.node(o).height}));c(i,function(o){n.node(o).y=t+a/2}),t+=a+r})}function js(n,e){var r=e&&e.debugTiming?go:po;r("layout",function(){var t=r(" buildLayoutGraph",function(){return Ps(n)});r(" runLayout",function(){Es(t,r)}),r(" updateInputGraph",function(){ys(n,t)})})}function Es(n,e){e(" makeSpaceForEdgeLabels",function(){$s(n)}),e(" removeSelfEdges",function(){Ys(n)}),e(" acyclic",function(){so(n)}),e(" nestingGraph.run",function(){Do(n)}),e(" rank",function(){Mo(Ve(n))}),e(" injectEdgeLabelProxies",function(){Ss(n)}),e(" removeEmptyRanks",function(){lo(n)}),e(" nestingGraph.cleanup",function(){Bo(n)}),e(" normalizeRanks",function(){ho(n)}),e(" assignRankMinMax",function(){Ms(n)}),e(" removeEdgeLabelProxies",function(){Rs(n)}),e(" normalize.run",function(){yo(n)}),e(" parentDummyChains",function(){ts(n)}),e(" addBorderSegments",function(){bo(n)}),e(" order",function(){es(n)}),e(" insertSelfEdges",function(){Us(n)}),e(" adjustCoordinateSystem",function(){wo(n)}),e(" position",function(){ms(n)}),e(" positionSelfEdges",function(){qs(n)}),e(" removeBorderNodes",function(){Bs(n)}),e(" normalize.undo",function(){To(n)}),e(" fixupEdgeLabelCoords",function(){ks(n)}),e(" undoCoordinateSystem",function(){mo(n)}),e(" translateGraph",function(){Fs(n)}),e(" assignNodeIntersects",function(){Ds(n)}),e(" reversePoints",function(){Gs(n)}),e(" acyclic.undo",function(){fo(n)})}function ys(n,e){c(n.nodes(),function(r){var t=n.node(r),i=e.node(r);t&&(t.x=i.x,t.y=i.y,e.children(r).length&&(t.width=i.width,t.height=i.height))}),c(n.edges(),function(r){var t=n.edge(r),i=e.edge(r);t.points=i.points,b(i,"x")&&(t.x=i.x,t.y=i.y)}),n.graph().width=e.graph().width,n.graph().height=e.graph().height}var xs=["nodesep","edgesep","ranksep","marginx","marginy"],Ts={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Ls=["acyclicer","ranker","rankdir","align"],As=["width","height"],Ns={width:0,height:0},Os=["minlen","weight","width","height","labeloffset"],Cs={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Is=["labelpos"];function Ps(n){var e=new L({multigraph:!0,compound:!0}),r=Tn(n.graph());return e.setGraph(An({},Ts,xn(r,xs),un(r,Ls))),c(n.nodes(),function(t){var i=Tn(n.node(t));e.setNode(t,va(xn(i,As),Ns)),e.setParent(t,n.parent(t))}),c(n.edges(),function(t){var i=Tn(n.edge(t));e.setEdge(t,An({},Cs,xn(i,Os),un(i,Is)))}),e}function $s(n){var e=n.graph();e.ranksep/=2,c(n.edges(),function(r){var t=n.edge(r);t.minlen*=2,t.labelpos.toLowerCase()!=="c"&&(e.rankdir==="TB"||e.rankdir==="BT"?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function Ss(n){c(n.edges(),function(e){var r=n.edge(e);if(r.width&&r.height){var t=n.node(e.v),i=n.node(e.w),a={rank:(i.rank-t.rank)/2+t.rank,e};G(n,"edge-proxy",a,"_ep")}})}function Ms(n){var e=0;c(n.nodes(),function(r){var t=n.node(r);t.borderTop&&(t.minRank=n.node(t.borderTop).rank,t.maxRank=n.node(t.borderBottom).rank,e=S(e,t.maxRank))}),n.graph().maxRank=e}function Rs(n){c(n.nodes(),function(e){var r=n.node(e);r.dummy==="edge-proxy"&&(n.edge(r.e).labelRank=r.rank,n.removeNode(e))})}function Fs(n){var e=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,i=0,a=n.graph(),o=a.marginx||0,s=a.marginy||0;function u(f){var d=f.x,h=f.y,l=f.width,g=f.height;e=Math.min(e,d-l/2),r=Math.max(r,d+l/2),t=Math.min(t,h-g/2),i=Math.max(i,h+g/2)}c(n.nodes(),function(f){u(n.node(f))}),c(n.edges(),function(f){var d=n.edge(f);b(d,"x")&&u(d)}),e-=o,t-=s,c(n.nodes(),function(f){var d=n.node(f);d.x-=e,d.y-=t}),c(n.edges(),function(f){var d=n.edge(f);c(d.points,function(h){h.x-=e,h.y-=t}),b(d,"x")&&(d.x-=e),b(d,"y")&&(d.y-=t)}),a.width=r-e+o,a.height=i-t+s}function Ds(n){c(n.edges(),function(e){var r=n.edge(e),t=n.node(e.v),i=n.node(e.w),a,o;r.points?(a=r.points[0],o=r.points[r.points.length-1]):(r.points=[],a=i,o=t),r.points.unshift(ge(t,a)),r.points.push(ge(i,o))})}function ks(n){c(n.edges(),function(e){var r=n.edge(e);if(b(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function Gs(n){c(n.edges(),function(e){var r=n.edge(e);r.reversed&&r.points.reverse()})}function Bs(n){c(n.nodes(),function(e){if(n.children(e).length){var r=n.node(e),t=n.node(r.borderTop),i=n.node(r.borderBottom),a=n.node(sn(r.borderLeft)),o=n.node(sn(r.borderRight));r.width=Math.abs(o.x-a.x),r.height=Math.abs(i.y-t.y),r.x=a.x+r.width/2,r.y=t.y+r.height/2}}),c(n.nodes(),function(e){n.node(e).dummy==="border"&&n.removeNode(e)})}function Ys(n){c(n.edges(),function(e){if(e.v===e.w){var r=n.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e,label:n.edge(e)}),n.removeEdge(e)}})}function Us(n){var e=pn(n);c(e,function(r){var t=0;c(r,function(i,a){var o=n.node(i);o.order=a+t,c(o.selfEdges,function(s){G(n,"selfedge",{width:s.label.width,height:s.label.height,rank:o.rank,order:a+ ++t,e:s.e,label:s.label},"_se")}),delete o.selfEdges})})}function qs(n){c(n.nodes(),function(e){var r=n.node(e);if(r.dummy==="selfedge"){var t=n.node(r.e.v),i=t.x+t.width/2,a=t.y,o=r.x-i,s=t.height/2;n.setEdge(r.e,r.label),n.removeNode(e),r.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],r.label.x=r.x,r.label.y=r.y}})}function xn(n,e){return gn(un(n,e),Number)}function Tn(n){var e={};return c(n,function(r,t){e[t.toLowerCase()]=r}),e}export{L as G,tn as b,va as d,c as f,b as h,y as i,js as l,E as m,un as p,D as r,Un as u};
|
|
1
|
+
import{a8 as q,a9 as fr,aa as O,ab as x,ac as F,ad as fn,ae as dr,af as cr,ag as hr,ah as Te,ai as lr,aj as vr,ak as dn,al as X,am as gr,an as Le,ao as pr,ap as H,aq as an,ar as Cn,as as br,at as Ln,au as wr,av as mr,aw as U,ax as In,ay as _r,az as Ae,aA as Kn,aB as Er,aC as yr,aD as Ne,aE as V,aF as Oe,aG as xr,aH as Pn,aI as on,aJ as Tr,aK as bn,aL as Lr,aM as B,y as Xn,aN as Vn,aO as An}from"./index-e793d777.js";var Ar="[object Symbol]";function $(n){return typeof n=="symbol"||q(n)&&fr(n)==Ar}function R(n,e){for(var r=-1,t=n==null?0:n.length,i=Array(t);++r<t;)i[r]=e(n[r],r,n);return i}var Nr=1/0,Zn=O?O.prototype:void 0,Jn=Zn?Zn.toString:void 0;function Ce(n){if(typeof n=="string")return n;if(x(n))return R(n,Ce)+"";if($(n))return Jn?Jn.call(n):"";var e=n+"";return e=="0"&&1/n==-Nr?"-0":e}var Or=/\s/;function Cr(n){for(var e=n.length;e--&&Or.test(n.charAt(e)););return e}var Ir=/^\s+/;function Pr(n){return n&&n.slice(0,Cr(n)+1).replace(Ir,"")}var Qn=0/0,$r=/^[-+]0x[0-9a-f]+$/i,Sr=/^0b[01]+$/i,Mr=/^0o[0-7]+$/i,Rr=parseInt;function Fr(n){if(typeof n=="number")return n;if($(n))return Qn;if(F(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=F(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=Pr(n);var r=Sr.test(n);return r||Mr.test(n)?Rr(n.slice(2),r?2:8):$r.test(n)?Qn:+n}var zn=1/0,Dr=17976931348623157e292;function rn(n){if(!n)return n===0?n:0;if(n=Fr(n),n===zn||n===-zn){var e=n<0?-1:1;return e*Dr}return n===n?n:0}function kr(n){var e=rn(n),r=e%1;return e===e?r?e-r:e:0}function Gr(){}function Ie(n,e){for(var r=-1,t=n==null?0:n.length;++r<t&&e(n[r],r,n)!==!1;);return n}function Pe(n,e,r,t){for(var i=n.length,a=r+(t?1:-1);t?a--:++a<i;)if(e(n[a],a,n))return a;return-1}function Br(n){return n!==n}function Yr(n,e,r){for(var t=r-1,i=n.length;++t<i;)if(n[t]===e)return t;return-1}function Ur(n,e,r){return e===e?Yr(n,e,r):Pe(n,Br,r)}function qr(n,e){var r=n==null?0:n.length;return!!r&&Ur(n,e,0)>-1}function T(n){return fn(n)?dr(n):cr(n)}var Hr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jr=/^\w*$/;function $n(n,e){if(x(n))return!1;var r=typeof n;return r=="number"||r=="symbol"||r=="boolean"||n==null||$(n)?!0:jr.test(n)||!Hr.test(n)||e!=null&&n in Object(e)}var Wr=500;function Kr(n){var e=hr(n,function(t){return r.size===Wr&&r.clear(),t}),r=e.cache;return e}var Xr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Vr=/\\(\\)?/g,Zr=Kr(function(n){var e=[];return n.charCodeAt(0)===46&&e.push(""),n.replace(Xr,function(r,t,i,a){e.push(i?a.replace(Vr,"$1"):t||r)}),e});const Jr=Zr;function $e(n){return n==null?"":Ce(n)}function cn(n,e){return x(n)?n:$n(n,e)?[n]:Jr($e(n))}var Qr=1/0;function Z(n){if(typeof n=="string"||$(n))return n;var e=n+"";return e=="0"&&1/n==-Qr?"-0":e}function hn(n,e){e=cn(e,n);for(var r=0,t=e.length;n!=null&&r<t;)n=n[Z(e[r++])];return r&&r==t?n:void 0}function zr(n,e,r){var t=n==null?void 0:hn(n,e);return t===void 0?r:t}function Sn(n,e){for(var r=-1,t=e.length,i=n.length;++r<t;)n[i+r]=e[r];return n}var ne=O?O.isConcatSpreadable:void 0;function nt(n){return x(n)||Te(n)||!!(ne&&n&&n[ne])}function ln(n,e,r,t,i){var a=-1,o=n.length;for(r||(r=nt),i||(i=[]);++a<o;){var s=n[a];e>0&&r(s)?e>1?ln(s,e-1,r,t,i):Sn(i,s):t||(i[i.length]=s)}return i}function k(n){var e=n==null?0:n.length;return e?ln(n,1):[]}function et(n){return lr(vr(n,void 0,k),n+"")}function rt(n,e,r,t){var i=-1,a=n==null?0:n.length;for(t&&a&&(r=n[++i]);++i<a;)r=e(r,n[i],i,n);return r}function tt(n,e){return n&&dn(e,T(e),n)}function it(n,e){return n&&dn(e,X(e),n)}function Se(n,e){for(var r=-1,t=n==null?0:n.length,i=0,a=[];++r<t;){var o=n[r];e(o,r,n)&&(a[i++]=o)}return a}function Me(){return[]}var at=Object.prototype,ot=at.propertyIsEnumerable,ee=Object.getOwnPropertySymbols,st=ee?function(n){return n==null?[]:(n=Object(n),Se(ee(n),function(e){return ot.call(n,e)}))}:Me;const Mn=st;function ut(n,e){return dn(n,Mn(n),e)}var ft=Object.getOwnPropertySymbols,dt=ft?function(n){for(var e=[];n;)Sn(e,Mn(n)),n=gr(n);return e}:Me;const Re=dt;function ct(n,e){return dn(n,Re(n),e)}function Fe(n,e,r){var t=e(n);return x(n)?t:Sn(t,r(n))}function Nn(n){return Fe(n,T,Mn)}function ht(n){return Fe(n,X,Re)}var lt=Object.prototype,vt=lt.hasOwnProperty;function gt(n){var e=n.length,r=new n.constructor(e);return e&&typeof n[0]=="string"&&vt.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function pt(n,e){var r=e?Le(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.byteLength)}var bt=/\w*$/;function wt(n){var e=new n.constructor(n.source,bt.exec(n));return e.lastIndex=n.lastIndex,e}var re=O?O.prototype:void 0,te=re?re.valueOf:void 0;function mt(n){return te?Object(te.call(n)):{}}var _t="[object Boolean]",Et="[object Date]",yt="[object Map]",xt="[object Number]",Tt="[object RegExp]",Lt="[object Set]",At="[object String]",Nt="[object Symbol]",Ot="[object ArrayBuffer]",Ct="[object DataView]",It="[object Float32Array]",Pt="[object Float64Array]",$t="[object Int8Array]",St="[object Int16Array]",Mt="[object Int32Array]",Rt="[object Uint8Array]",Ft="[object Uint8ClampedArray]",Dt="[object Uint16Array]",kt="[object Uint32Array]";function Gt(n,e,r){var t=n.constructor;switch(e){case Ot:return Le(n);case _t:case Et:return new t(+n);case Ct:return pt(n,r);case It:case Pt:case $t:case St:case Mt:case Rt:case Ft:case Dt:case kt:return pr(n,r);case yt:return new t;case xt:case At:return new t(n);case Tt:return wt(n);case Lt:return new t;case Nt:return mt(n)}}var Bt="[object Map]";function Yt(n){return q(n)&&H(n)==Bt}var ie=an&&an.isMap,Ut=ie?Cn(ie):Yt;const qt=Ut;var Ht="[object Set]";function jt(n){return q(n)&&H(n)==Ht}var ae=an&&an.isSet,Wt=ae?Cn(ae):jt;const Kt=Wt;var Xt=1,Vt=2,Zt=4,De="[object Arguments]",Jt="[object Array]",Qt="[object Boolean]",zt="[object Date]",ni="[object Error]",ke="[object Function]",ei="[object GeneratorFunction]",ri="[object Map]",ti="[object Number]",Ge="[object Object]",ii="[object RegExp]",ai="[object Set]",oi="[object String]",si="[object Symbol]",ui="[object WeakMap]",fi="[object ArrayBuffer]",di="[object DataView]",ci="[object Float32Array]",hi="[object Float64Array]",li="[object Int8Array]",vi="[object Int16Array]",gi="[object Int32Array]",pi="[object Uint8Array]",bi="[object Uint8ClampedArray]",wi="[object Uint16Array]",mi="[object Uint32Array]",w={};w[De]=w[Jt]=w[fi]=w[di]=w[Qt]=w[zt]=w[ci]=w[hi]=w[li]=w[vi]=w[gi]=w[ri]=w[ti]=w[Ge]=w[ii]=w[ai]=w[oi]=w[si]=w[pi]=w[bi]=w[wi]=w[mi]=!0;w[ni]=w[ke]=w[ui]=!1;function tn(n,e,r,t,i,a){var o,s=e&Xt,u=e&Vt,f=e&Zt;if(r&&(o=i?r(n,t,i,a):r(n)),o!==void 0)return o;if(!F(n))return n;var d=x(n);if(d){if(o=gt(n),!s)return br(n,o)}else{var h=H(n),l=h==ke||h==ei;if(Ln(n))return wr(n,s);if(h==Ge||h==De||l&&!i){if(o=u||l?{}:mr(n),!s)return u?ct(n,it(o,n)):ut(n,tt(o,n))}else{if(!w[h])return i?n:{};o=Gt(n,h,s)}}a||(a=new U);var g=a.get(n);if(g)return g;a.set(n,o),Kt(n)?n.forEach(function(m){o.add(tn(m,e,r,m,n,a))}):qt(n)&&n.forEach(function(m,_){o.set(_,tn(m,e,r,_,n,a))});var v=f?u?ht:Nn:u?X:T,p=d?void 0:v(n);return Ie(p||n,function(m,_){p&&(_=m,m=n[_]),In(o,_,tn(m,e,r,_,n,a))}),o}var _i=1,Ei=4;function yi(n){return tn(n,_i|Ei)}var xi="__lodash_hash_undefined__";function Ti(n){return this.__data__.set(n,xi),this}function Li(n){return this.__data__.has(n)}function j(n){var e=-1,r=n==null?0:n.length;for(this.__data__=new _r;++e<r;)this.add(n[e])}j.prototype.add=j.prototype.push=Ti;j.prototype.has=Li;function Ai(n,e){for(var r=-1,t=n==null?0:n.length;++r<t;)if(e(n[r],r,n))return!0;return!1}function Be(n,e){return n.has(e)}var Ni=1,Oi=2;function Ye(n,e,r,t,i,a){var o=r&Ni,s=n.length,u=e.length;if(s!=u&&!(o&&u>s))return!1;var f=a.get(n),d=a.get(e);if(f&&d)return f==e&&d==n;var h=-1,l=!0,g=r&Oi?new j:void 0;for(a.set(n,e),a.set(e,n);++h<s;){var v=n[h],p=e[h];if(t)var m=o?t(p,v,h,e,n,a):t(v,p,h,n,e,a);if(m!==void 0){if(m)continue;l=!1;break}if(g){if(!Ai(e,function(_,I){if(!Be(g,I)&&(v===_||i(v,_,r,t,a)))return g.push(I)})){l=!1;break}}else if(!(v===p||i(v,p,r,t,a))){l=!1;break}}return a.delete(n),a.delete(e),l}function Ci(n){var e=-1,r=Array(n.size);return n.forEach(function(t,i){r[++e]=[i,t]}),r}function Rn(n){var e=-1,r=Array(n.size);return n.forEach(function(t){r[++e]=t}),r}var Ii=1,Pi=2,$i="[object Boolean]",Si="[object Date]",Mi="[object Error]",Ri="[object Map]",Fi="[object Number]",Di="[object RegExp]",ki="[object Set]",Gi="[object String]",Bi="[object Symbol]",Yi="[object ArrayBuffer]",Ui="[object DataView]",oe=O?O.prototype:void 0,wn=oe?oe.valueOf:void 0;function qi(n,e,r,t,i,a,o){switch(r){case Ui:if(n.byteLength!=e.byteLength||n.byteOffset!=e.byteOffset)return!1;n=n.buffer,e=e.buffer;case Yi:return!(n.byteLength!=e.byteLength||!a(new Kn(n),new Kn(e)));case $i:case Si:case Fi:return Ae(+n,+e);case Mi:return n.name==e.name&&n.message==e.message;case Di:case Gi:return n==e+"";case Ri:var s=Ci;case ki:var u=t&Ii;if(s||(s=Rn),n.size!=e.size&&!u)return!1;var f=o.get(n);if(f)return f==e;t|=Pi,o.set(n,e);var d=Ye(s(n),s(e),t,i,a,o);return o.delete(n),d;case Bi:if(wn)return wn.call(n)==wn.call(e)}return!1}var Hi=1,ji=Object.prototype,Wi=ji.hasOwnProperty;function Ki(n,e,r,t,i,a){var o=r&Hi,s=Nn(n),u=s.length,f=Nn(e),d=f.length;if(u!=d&&!o)return!1;for(var h=u;h--;){var l=s[h];if(!(o?l in e:Wi.call(e,l)))return!1}var g=a.get(n),v=a.get(e);if(g&&v)return g==e&&v==n;var p=!0;a.set(n,e),a.set(e,n);for(var m=o;++h<u;){l=s[h];var _=n[l],I=e[l];if(t)var Wn=o?t(I,_,l,e,n,a):t(_,I,l,n,e,a);if(!(Wn===void 0?_===I||i(_,I,r,t,a):Wn)){p=!1;break}m||(m=l=="constructor")}if(p&&!m){var z=n.constructor,nn=e.constructor;z!=nn&&"constructor"in n&&"constructor"in e&&!(typeof z=="function"&&z instanceof z&&typeof nn=="function"&&nn instanceof nn)&&(p=!1)}return a.delete(n),a.delete(e),p}var Xi=1,se="[object Arguments]",ue="[object Array]",en="[object Object]",Vi=Object.prototype,fe=Vi.hasOwnProperty;function Zi(n,e,r,t,i,a){var o=x(n),s=x(e),u=o?ue:H(n),f=s?ue:H(e);u=u==se?en:u,f=f==se?en:f;var d=u==en,h=f==en,l=u==f;if(l&&Ln(n)){if(!Ln(e))return!1;o=!0,d=!1}if(l&&!d)return a||(a=new U),o||Er(n)?Ye(n,e,r,t,i,a):qi(n,e,u,r,t,i,a);if(!(r&Xi)){var g=d&&fe.call(n,"__wrapped__"),v=h&&fe.call(e,"__wrapped__");if(g||v){var p=g?n.value():n,m=v?e.value():e;return a||(a=new U),i(p,m,r,t,a)}}return l?(a||(a=new U),Ki(n,e,r,t,i,a)):!1}function Fn(n,e,r,t,i){return n===e?!0:n==null||e==null||!q(n)&&!q(e)?n!==n&&e!==e:Zi(n,e,r,t,Fn,i)}var Ji=1,Qi=2;function zi(n,e,r,t){var i=r.length,a=i,o=!t;if(n==null)return!a;for(n=Object(n);i--;){var s=r[i];if(o&&s[2]?s[1]!==n[s[0]]:!(s[0]in n))return!1}for(;++i<a;){s=r[i];var u=s[0],f=n[u],d=s[1];if(o&&s[2]){if(f===void 0&&!(u in n))return!1}else{var h=new U;if(t)var l=t(f,d,u,n,e,h);if(!(l===void 0?Fn(d,f,Ji|Qi,t,h):l))return!1}}return!0}function Ue(n){return n===n&&!F(n)}function na(n){for(var e=T(n),r=e.length;r--;){var t=e[r],i=n[t];e[r]=[t,i,Ue(i)]}return e}function qe(n,e){return function(r){return r==null?!1:r[n]===e&&(e!==void 0||n in Object(r))}}function ea(n){var e=na(n);return e.length==1&&e[0][2]?qe(e[0][0],e[0][1]):function(r){return r===n||zi(r,n,e)}}function ra(n,e){return n!=null&&e in Object(n)}function He(n,e,r){e=cn(e,n);for(var t=-1,i=e.length,a=!1;++t<i;){var o=Z(e[t]);if(!(a=n!=null&&r(n,o)))break;n=n[o]}return a||++t!=i?a:(i=n==null?0:n.length,!!i&&yr(i)&&Ne(o,i)&&(x(n)||Te(n)))}function je(n,e){return n!=null&&He(n,e,ra)}var ta=1,ia=2;function aa(n,e){return $n(n)&&Ue(e)?qe(Z(n),e):function(r){var t=zr(r,n);return t===void 0&&t===e?je(r,n):Fn(e,t,ta|ia)}}function oa(n){return function(e){return e==null?void 0:e[n]}}function sa(n){return function(e){return hn(e,n)}}function ua(n){return $n(n)?oa(Z(n)):sa(n)}function C(n){return typeof n=="function"?n:n==null?V:typeof n=="object"?x(n)?aa(n[0],n[1]):ea(n):ua(n)}function Dn(n,e){return n&&Oe(n,e,T)}function fa(n,e){return function(r,t){if(r==null)return r;if(!fn(r))return n(r,t);for(var i=r.length,a=e?i:-1,o=Object(r);(e?a--:++a<i)&&t(o[a],a,o)!==!1;);return r}}var da=fa(Dn);const vn=da;var ca=function(){return xr.Date.now()};const de=ca;var We=Object.prototype,ha=We.hasOwnProperty,la=Pn(function(n,e){n=Object(n);var r=-1,t=e.length,i=t>2?e[2]:void 0;for(i&&on(e[0],e[1],i)&&(t=1);++r<t;)for(var a=e[r],o=X(a),s=-1,u=o.length;++s<u;){var f=o[s],d=n[f];(d===void 0||Ae(d,We[f])&&!ha.call(n,f))&&(n[f]=a[f])}return n});const va=la;function ga(n,e,r){for(var t=-1,i=n==null?0:n.length;++t<i;)if(r(e,n[t]))return!0;return!1}function sn(n){var e=n==null?0:n.length;return e?n[e-1]:void 0}function kn(n){return typeof n=="function"?n:V}function c(n,e){var r=x(n)?Ie:vn;return r(n,kn(e))}function pa(n,e){var r=[];return vn(n,function(t,i,a){e(t,i,a)&&r.push(t)}),r}function A(n,e){var r=x(n)?Se:pa;return r(n,C(e))}function ba(n){return function(e,r,t){var i=Object(e);if(!fn(e)){var a=C(r);e=T(e),r=function(s){return a(i[s],s,i)}}var o=n(e,r,t);return o>-1?i[a?e[o]:o]:void 0}}var wa=Math.max;function ma(n,e,r){var t=n==null?0:n.length;if(!t)return-1;var i=r==null?0:kr(r);return i<0&&(i=wa(t+i,0)),Pe(n,C(e),i)}var _a=ba(ma);const Gn=_a;function Ke(n,e){var r=-1,t=fn(n)?Array(n.length):[];return vn(n,function(i,a,o){t[++r]=e(i,a,o)}),t}function E(n,e){var r=x(n)?R:Ke;return r(n,C(e))}function Ea(n,e){return n==null?n:Oe(n,kn(e),X)}function ya(n,e){return n&&Dn(n,kn(e))}function xa(n,e){return n>e}var Ta=Object.prototype,La=Ta.hasOwnProperty;function Aa(n,e){return n!=null&&La.call(n,e)}function b(n,e){return n!=null&&He(n,e,Aa)}function Na(n,e){return R(e,function(r){return n[r]})}function N(n){return n==null?[]:Na(n,T(n))}function y(n){return n===void 0}function Xe(n,e){return n<e}function gn(n,e){var r={};return e=C(e),Dn(n,function(t,i,a){Tr(r,i,e(t,i,a))}),r}function Bn(n,e,r){for(var t=-1,i=n.length;++t<i;){var a=n[t],o=e(a);if(o!=null&&(s===void 0?o===o&&!$(o):r(o,s)))var s=o,u=a}return u}function S(n){return n&&n.length?Bn(n,V,xa):void 0}function W(n){return n&&n.length?Bn(n,V,Xe):void 0}function Yn(n,e){return n&&n.length?Bn(n,C(e),Xe):void 0}function Oa(n,e,r,t){if(!F(n))return n;e=cn(e,n);for(var i=-1,a=e.length,o=a-1,s=n;s!=null&&++i<a;){var u=Z(e[i]),f=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return n;if(i!=o){var d=s[u];f=t?t(d,u,s):void 0,f===void 0&&(f=F(d)?d:Ne(e[i+1])?[]:{})}In(s,u,f),s=s[u]}return n}function Ca(n,e,r){for(var t=-1,i=e.length,a={};++t<i;){var o=e[t],s=hn(n,o);r(s,o)&&Oa(a,cn(o,n),s)}return a}function Ia(n,e){var r=n.length;for(n.sort(e);r--;)n[r]=n[r].value;return n}function Pa(n,e){if(n!==e){var r=n!==void 0,t=n===null,i=n===n,a=$(n),o=e!==void 0,s=e===null,u=e===e,f=$(e);if(!s&&!f&&!a&&n>e||a&&o&&u&&!s&&!f||t&&o&&u||!r&&u||!i)return 1;if(!t&&!a&&!f&&n<e||f&&r&&i&&!t&&!a||s&&r&&i||!o&&i||!u)return-1}return 0}function $a(n,e,r){for(var t=-1,i=n.criteria,a=e.criteria,o=i.length,s=r.length;++t<o;){var u=Pa(i[t],a[t]);if(u){if(t>=s)return u;var f=r[t];return u*(f=="desc"?-1:1)}}return n.index-e.index}function Sa(n,e,r){e.length?e=R(e,function(a){return x(a)?function(o){return hn(o,a.length===1?a[0]:a)}:a}):e=[V];var t=-1;e=R(e,Cn(C));var i=Ke(n,function(a,o,s){var u=R(e,function(f){return f(a)});return{criteria:u,index:++t,value:a}});return Ia(i,function(a,o){return $a(a,o,r)})}function Ma(n,e){return Ca(n,e,function(r,t){return je(n,t)})}var Ra=et(function(n,e){return n==null?{}:Ma(n,e)});const un=Ra;var Fa=Math.ceil,Da=Math.max;function ka(n,e,r,t){for(var i=-1,a=Da(Fa((e-n)/(r||1)),0),o=Array(a);a--;)o[t?a:++i]=n,n+=r;return o}function Ga(n){return function(e,r,t){return t&&typeof t!="number"&&on(e,r,t)&&(r=t=void 0),e=rn(e),r===void 0?(r=e,e=0):r=rn(r),t=t===void 0?e<r?1:-1:rn(t),ka(e,r,t,n)}}var Ba=Ga();const D=Ba;function Ya(n,e,r,t,i){return i(n,function(a,o,s){r=t?(t=!1,a):e(r,a,o,s)}),r}function J(n,e,r){var t=x(n)?rt:Ya,i=arguments.length<3;return t(n,C(e),r,i,vn)}var Ua=Pn(function(n,e){if(n==null)return[];var r=e.length;return r>1&&on(n,e[0],e[1])?e=[]:r>2&&on(e[0],e[1],e[2])&&(e=[e[0]]),Sa(n,ln(e,1),[])});const Q=Ua;var qa=1/0,Ha=bn&&1/Rn(new bn([,-0]))[1]==qa?function(n){return new bn(n)}:Gr;const ja=Ha;var Wa=200;function Ka(n,e,r){var t=-1,i=qr,a=n.length,o=!0,s=[],u=s;if(r)o=!1,i=ga;else if(a>=Wa){var f=e?null:ja(n);if(f)return Rn(f);o=!1,i=Be,u=new j}else u=e?[]:s;n:for(;++t<a;){var d=n[t],h=e?e(d):d;if(d=r||d!==0?d:0,o&&h===h){for(var l=u.length;l--;)if(u[l]===h)continue n;e&&u.push(h),s.push(d)}else i(u,h,r)||(u!==s&&u.push(h),s.push(d))}return s}var Xa=Pn(function(n){return Ka(ln(n,1,Lr,!0))});const Va=Xa;var Za=0;function Un(n){var e=++Za;return $e(n)+e}function Ja(n,e,r){for(var t=-1,i=n.length,a=e.length,o={};++t<i;){var s=t<a?e[t]:void 0;r(o,n[t],s)}return o}function Qa(n,e){return Ja(n||[],e||[],In)}var za="\0",P="\0",ce="";class L{constructor(e={}){this._isDirected=b(e,"directed")?e.directed:!0,this._isMultigraph=b(e,"multigraph")?e.multigraph:!1,this._isCompound=b(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=B(void 0),this._defaultEdgeLabelFn=B(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[P]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return Xn(e)||(e=B(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return T(this._nodes)}sources(){var e=this;return A(this.nodes(),function(r){return Vn(e._in[r])})}sinks(){var e=this;return A(this.nodes(),function(r){return Vn(e._out[r])})}setNodes(e,r){var t=arguments,i=this;return c(e,function(a){t.length>1?i.setNode(a,r):i.setNode(a)}),this}setNode(e,r){return b(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=r),this):(this._nodes[e]=arguments.length>1?r:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=P,this._children[e]={},this._children[P][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return b(this._nodes,e)}removeNode(e){var r=this;if(b(this._nodes,e)){var t=function(i){r.removeEdge(r._edgeObjs[i])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],c(this.children(e),function(i){r.setParent(i)}),delete this._children[e]),c(T(this._in[e]),t),delete this._in[e],delete this._preds[e],c(T(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(y(r))r=P;else{r+="";for(var t=r;!y(t);t=this.parent(t))if(t===e)throw new Error("Setting "+r+" as parent of "+e+" would create a cycle");this.setNode(r)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=r,this._children[r][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var r=this._parent[e];if(r!==P)return r}}children(e){if(y(e)&&(e=P),this._isCompound){var r=this._children[e];if(r)return T(r)}else{if(e===P)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var r=this._preds[e];if(r)return T(r)}successors(e){var r=this._sucs[e];if(r)return T(r)}neighbors(e){var r=this.predecessors(e);if(r)return Va(r,this.successors(e))}isLeaf(e){var r;return this.isDirected()?r=this.successors(e):r=this.neighbors(e),r.length===0}filterNodes(e){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var t=this;c(this._nodes,function(o,s){e(s)&&r.setNode(s,o)}),c(this._edgeObjs,function(o){r.hasNode(o.v)&&r.hasNode(o.w)&&r.setEdge(o,t.edge(o))});var i={};function a(o){var s=t.parent(o);return s===void 0||r.hasNode(s)?(i[o]=s,s):s in i?i[s]:a(s)}return this._isCompound&&c(r.nodes(),function(o){r.setParent(o,a(o))}),r}setDefaultEdgeLabel(e){return Xn(e)||(e=B(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return N(this._edgeObjs)}setPath(e,r){var t=this,i=arguments;return J(e,function(a,o){return i.length>1?t.setEdge(a,o,r):t.setEdge(a,o),o}),this}setEdge(){var e,r,t,i,a=!1,o=arguments[0];typeof o=="object"&&o!==null&&"v"in o?(e=o.v,r=o.w,t=o.name,arguments.length===2&&(i=arguments[1],a=!0)):(e=o,r=arguments[1],t=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),e=""+e,r=""+r,y(t)||(t=""+t);var s=Y(this._isDirected,e,r,t);if(b(this._edgeLabels,s))return a&&(this._edgeLabels[s]=i),this;if(!y(t)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(r),this._edgeLabels[s]=a?i:this._defaultEdgeLabelFn(e,r,t);var u=no(this._isDirected,e,r,t);return e=u.v,r=u.w,Object.freeze(u),this._edgeObjs[s]=u,he(this._preds[r],e),he(this._sucs[e],r),this._in[r][s]=u,this._out[e][s]=u,this._edgeCount++,this}edge(e,r,t){var i=arguments.length===1?mn(this._isDirected,arguments[0]):Y(this._isDirected,e,r,t);return this._edgeLabels[i]}hasEdge(e,r,t){var i=arguments.length===1?mn(this._isDirected,arguments[0]):Y(this._isDirected,e,r,t);return b(this._edgeLabels,i)}removeEdge(e,r,t){var i=arguments.length===1?mn(this._isDirected,arguments[0]):Y(this._isDirected,e,r,t),a=this._edgeObjs[i];return a&&(e=a.v,r=a.w,delete this._edgeLabels[i],delete this._edgeObjs[i],le(this._preds[r],e),le(this._sucs[e],r),delete this._in[r][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,r){var t=this._in[e];if(t){var i=N(t);return r?A(i,function(a){return a.v===r}):i}}outEdges(e,r){var t=this._out[e];if(t){var i=N(t);return r?A(i,function(a){return a.w===r}):i}}nodeEdges(e,r){var t=this.inEdges(e,r);if(t)return t.concat(this.outEdges(e,r))}}L.prototype._nodeCount=0;L.prototype._edgeCount=0;function he(n,e){n[e]?n[e]++:n[e]=1}function le(n,e){--n[e]||delete n[e]}function Y(n,e,r,t){var i=""+e,a=""+r;if(!n&&i>a){var o=i;i=a,a=o}return i+ce+a+ce+(y(t)?za:t)}function no(n,e,r,t){var i=""+e,a=""+r;if(!n&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return t&&(s.name=t),s}function mn(n,e){return Y(n,e.v,e.w,e.name)}class eo{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,r=e._prev;if(r!==e)return ve(r),r}enqueue(e){var r=this._sentinel;e._prev&&e._next&&ve(e),e._next=r._next,r._next._prev=e,r._next=e,e._prev=r}toString(){for(var e=[],r=this._sentinel,t=r._prev;t!==r;)e.push(JSON.stringify(t,ro)),t=t._prev;return"["+e.join(", ")+"]"}}function ve(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function ro(n,e){if(n!=="_next"&&n!=="_prev")return e}var to=B(1);function io(n,e){if(n.nodeCount()<=1)return[];var r=oo(n,e||to),t=ao(r.graph,r.buckets,r.zeroIdx);return k(E(t,function(i){return n.outEdges(i.v,i.w)}))}function ao(n,e,r){for(var t=[],i=e[e.length-1],a=e[0],o;n.nodeCount();){for(;o=a.dequeue();)_n(n,e,r,o);for(;o=i.dequeue();)_n(n,e,r,o);if(n.nodeCount()){for(var s=e.length-2;s>0;--s)if(o=e[s].dequeue(),o){t=t.concat(_n(n,e,r,o,!0));break}}}return t}function _n(n,e,r,t,i){var a=i?[]:void 0;return c(n.inEdges(t.v),function(o){var s=n.edge(o),u=n.node(o.v);i&&a.push({v:o.v,w:o.w}),u.out-=s,On(e,r,u)}),c(n.outEdges(t.v),function(o){var s=n.edge(o),u=o.w,f=n.node(u);f.in-=s,On(e,r,f)}),n.removeNode(t.v),a}function oo(n,e){var r=new L,t=0,i=0;c(n.nodes(),function(s){r.setNode(s,{v:s,in:0,out:0})}),c(n.edges(),function(s){var u=r.edge(s.v,s.w)||0,f=e(s),d=u+f;r.setEdge(s.v,s.w,d),i=Math.max(i,r.node(s.v).out+=f),t=Math.max(t,r.node(s.w).in+=f)});var a=D(i+t+3).map(function(){return new eo}),o=t+1;return c(r.nodes(),function(s){On(a,o,r.node(s))}),{graph:r,buckets:a,zeroIdx:o}}function On(n,e,r){r.out?r.in?n[r.out-r.in+e].enqueue(r):n[n.length-1].enqueue(r):n[0].enqueue(r)}function so(n){var e=n.graph().acyclicer==="greedy"?io(n,r(n)):uo(n);c(e,function(t){var i=n.edge(t);n.removeEdge(t),i.forwardName=t.name,i.reversed=!0,n.setEdge(t.w,t.v,i,Un("rev"))});function r(t){return function(i){return t.edge(i).weight}}}function uo(n){var e=[],r={},t={};function i(a){b(t,a)||(t[a]=!0,r[a]=!0,c(n.outEdges(a),function(o){b(r,o.w)?e.push(o):i(o.w)}),delete r[a])}return c(n.nodes(),i),e}function fo(n){c(n.edges(),function(e){var r=n.edge(e);if(r.reversed){n.removeEdge(e);var t=r.forwardName;delete r.reversed,delete r.forwardName,n.setEdge(e.w,e.v,r,t)}})}function G(n,e,r,t){var i;do i=Un(t);while(n.hasNode(i));return r.dummy=e,n.setNode(i,r),i}function co(n){var e=new L().setGraph(n.graph());return c(n.nodes(),function(r){e.setNode(r,n.node(r))}),c(n.edges(),function(r){var t=e.edge(r.v,r.w)||{weight:0,minlen:1},i=n.edge(r);e.setEdge(r.v,r.w,{weight:t.weight+i.weight,minlen:Math.max(t.minlen,i.minlen)})}),e}function Ve(n){var e=new L({multigraph:n.isMultigraph()}).setGraph(n.graph());return c(n.nodes(),function(r){n.children(r).length||e.setNode(r,n.node(r))}),c(n.edges(),function(r){e.setEdge(r,n.edge(r))}),e}function ge(n,e){var r=n.x,t=n.y,i=e.x-r,a=e.y-t,o=n.width/2,s=n.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var u,f;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),u=s*i/a,f=s):(i<0&&(o=-o),u=o,f=o*a/i),{x:r+u,y:t+f}}function pn(n){var e=E(D(Ze(n)+1),function(){return[]});return c(n.nodes(),function(r){var t=n.node(r),i=t.rank;y(i)||(e[i][t.order]=r)}),e}function ho(n){var e=W(E(n.nodes(),function(r){return n.node(r).rank}));c(n.nodes(),function(r){var t=n.node(r);b(t,"rank")&&(t.rank-=e)})}function lo(n){var e=W(E(n.nodes(),function(a){return n.node(a).rank})),r=[];c(n.nodes(),function(a){var o=n.node(a).rank-e;r[o]||(r[o]=[]),r[o].push(a)});var t=0,i=n.graph().nodeRankFactor;c(r,function(a,o){y(a)&&o%i!==0?--t:t&&c(a,function(s){n.node(s).rank+=t})})}function pe(n,e,r,t){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=t),G(n,"border",i,e)}function Ze(n){return S(E(n.nodes(),function(e){var r=n.node(e).rank;if(!y(r))return r}))}function vo(n,e){var r={lhs:[],rhs:[]};return c(n,function(t){e(t)?r.lhs.push(t):r.rhs.push(t)}),r}function go(n,e){var r=de();try{return e()}finally{console.log(n+" time: "+(de()-r)+"ms")}}function po(n,e){return e()}function bo(n){function e(r){var t=n.children(r),i=n.node(r);if(t.length&&c(t,e),b(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;a<o;++a)be(n,"borderLeft","_bl",r,i,a),be(n,"borderRight","_br",r,i,a)}}c(n.children(),e)}function be(n,e,r,t,i,a){var o={width:0,height:0,rank:a,borderType:e},s=i[e][a-1],u=G(n,"border",o,r);i[e][a]=u,n.setParent(u,t),s&&n.setEdge(s,u,{weight:1})}function wo(n){var e=n.graph().rankdir.toLowerCase();(e==="lr"||e==="rl")&&Je(n)}function mo(n){var e=n.graph().rankdir.toLowerCase();(e==="bt"||e==="rl")&&_o(n),(e==="lr"||e==="rl")&&(Eo(n),Je(n))}function Je(n){c(n.nodes(),function(e){we(n.node(e))}),c(n.edges(),function(e){we(n.edge(e))})}function we(n){var e=n.width;n.width=n.height,n.height=e}function _o(n){c(n.nodes(),function(e){En(n.node(e))}),c(n.edges(),function(e){var r=n.edge(e);c(r.points,En),b(r,"y")&&En(r)})}function En(n){n.y=-n.y}function Eo(n){c(n.nodes(),function(e){yn(n.node(e))}),c(n.edges(),function(e){var r=n.edge(e);c(r.points,yn),b(r,"x")&&yn(r)})}function yn(n){var e=n.x;n.x=n.y,n.y=e}function yo(n){n.graph().dummyChains=[],c(n.edges(),function(e){xo(n,e)})}function xo(n,e){var r=e.v,t=n.node(r).rank,i=e.w,a=n.node(i).rank,o=e.name,s=n.edge(e),u=s.labelRank;if(a!==t+1){n.removeEdge(e);var f,d,h;for(h=0,++t;t<a;++h,++t)s.points=[],d={width:0,height:0,edgeLabel:s,edgeObj:e,rank:t},f=G(n,"edge",d,"_d"),t===u&&(d.width=s.width,d.height=s.height,d.dummy="edge-label",d.labelpos=s.labelpos),n.setEdge(r,f,{weight:s.weight},o),h===0&&n.graph().dummyChains.push(f),r=f;n.setEdge(r,i,{weight:s.weight},o)}}function To(n){c(n.graph().dummyChains,function(e){var r=n.node(e),t=r.edgeLabel,i;for(n.setEdge(r.edgeObj,t);r.dummy;)i=n.successors(e)[0],n.removeNode(e),t.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height),e=i,r=n.node(e)})}function qn(n){var e={};function r(t){var i=n.node(t);if(b(e,t))return i.rank;e[t]=!0;var a=W(E(n.outEdges(t),function(o){return r(o.w)-n.edge(o).minlen}));return(a===Number.POSITIVE_INFINITY||a===void 0||a===null)&&(a=0),i.rank=a}c(n.sources(),r)}function K(n,e){return n.node(e.w).rank-n.node(e.v).rank-n.edge(e).minlen}function Qe(n){var e=new L({directed:!1}),r=n.nodes()[0],t=n.nodeCount();e.setNode(r,{});for(var i,a;Lo(e,n)<t;)i=Ao(e,n),a=e.hasNode(i.v)?K(n,i):-K(n,i),No(e,n,a);return e}function Lo(n,e){function r(t){c(e.nodeEdges(t),function(i){var a=i.v,o=t===a?i.w:a;!n.hasNode(o)&&!K(e,i)&&(n.setNode(o,{}),n.setEdge(t,o,{}),r(o))})}return c(n.nodes(),r),n.nodeCount()}function Ao(n,e){return Yn(e.edges(),function(r){if(n.hasNode(r.v)!==n.hasNode(r.w))return K(e,r)})}function No(n,e,r){c(n.nodes(),function(t){e.node(t).rank+=r})}function Oo(){}Oo.prototype=new Error;function ze(n,e,r){x(e)||(e=[e]);var t=(n.isDirected()?n.successors:n.neighbors).bind(n),i=[],a={};return c(e,function(o){if(!n.hasNode(o))throw new Error("Graph does not have node: "+o);nr(n,o,r==="post",a,t,i)}),i}function nr(n,e,r,t,i,a){b(t,e)||(t[e]=!0,r||a.push(e),c(i(e),function(o){nr(n,o,r,t,i,a)}),r&&a.push(e))}function Co(n,e){return ze(n,e,"post")}function Io(n,e){return ze(n,e,"pre")}M.initLowLimValues=jn;M.initCutValues=Hn;M.calcCutValue=er;M.leaveEdge=tr;M.enterEdge=ir;M.exchangeEdges=ar;function M(n){n=co(n),qn(n);var e=Qe(n);jn(e),Hn(e,n);for(var r,t;r=tr(e);)t=ir(e,n,r),ar(e,n,r,t)}function Hn(n,e){var r=Co(n,n.nodes());r=r.slice(0,r.length-1),c(r,function(t){Po(n,e,t)})}function Po(n,e,r){var t=n.node(r),i=t.parent;n.edge(r,i).cutvalue=er(n,e,r)}function er(n,e,r){var t=n.node(r),i=t.parent,a=!0,o=e.edge(r,i),s=0;return o||(a=!1,o=e.edge(i,r)),s=o.weight,c(e.nodeEdges(r),function(u){var f=u.v===r,d=f?u.w:u.v;if(d!==i){var h=f===a,l=e.edge(u).weight;if(s+=h?l:-l,So(n,r,d)){var g=n.edge(r,d).cutvalue;s+=h?-g:g}}}),s}function jn(n,e){arguments.length<2&&(e=n.nodes()[0]),rr(n,{},1,e)}function rr(n,e,r,t,i){var a=r,o=n.node(t);return e[t]=!0,c(n.neighbors(t),function(s){b(e,s)||(r=rr(n,e,r,s,t))}),o.low=a,o.lim=r++,i?o.parent=i:delete o.parent,r}function tr(n){return Gn(n.edges(),function(e){return n.edge(e).cutvalue<0})}function ir(n,e,r){var t=r.v,i=r.w;e.hasEdge(t,i)||(t=r.w,i=r.v);var a=n.node(t),o=n.node(i),s=a,u=!1;a.lim>o.lim&&(s=o,u=!0);var f=A(e.edges(),function(d){return u===me(n,n.node(d.v),s)&&u!==me(n,n.node(d.w),s)});return Yn(f,function(d){return K(e,d)})}function ar(n,e,r,t){var i=r.v,a=r.w;n.removeEdge(i,a),n.setEdge(t.v,t.w,{}),jn(n),Hn(n,e),$o(n,e)}function $o(n,e){var r=Gn(n.nodes(),function(i){return!e.node(i).parent}),t=Io(n,r);t=t.slice(1),c(t,function(i){var a=n.node(i).parent,o=e.edge(i,a),s=!1;o||(o=e.edge(a,i),s=!0),e.node(i).rank=e.node(a).rank+(s?o.minlen:-o.minlen)})}function So(n,e,r){return n.hasEdge(e,r)}function me(n,e,r){return r.low<=e.lim&&e.lim<=r.lim}function Mo(n){switch(n.graph().ranker){case"network-simplex":_e(n);break;case"tight-tree":Fo(n);break;case"longest-path":Ro(n);break;default:_e(n)}}var Ro=qn;function Fo(n){qn(n),Qe(n)}function _e(n){M(n)}function Do(n){var e=G(n,"root",{},"_root"),r=ko(n),t=S(N(r))-1,i=2*t+1;n.graph().nestingRoot=e,c(n.edges(),function(o){n.edge(o).minlen*=i});var a=Go(n)+1;c(n.children(),function(o){or(n,e,i,a,t,r,o)}),n.graph().nodeRankFactor=i}function or(n,e,r,t,i,a,o){var s=n.children(o);if(!s.length){o!==e&&n.setEdge(e,o,{weight:0,minlen:r});return}var u=pe(n,"_bt"),f=pe(n,"_bb"),d=n.node(o);n.setParent(u,o),d.borderTop=u,n.setParent(f,o),d.borderBottom=f,c(s,function(h){or(n,e,r,t,i,a,h);var l=n.node(h),g=l.borderTop?l.borderTop:h,v=l.borderBottom?l.borderBottom:h,p=l.borderTop?t:2*t,m=g!==v?1:i-a[o]+1;n.setEdge(u,g,{weight:p,minlen:m,nestingEdge:!0}),n.setEdge(v,f,{weight:p,minlen:m,nestingEdge:!0})}),n.parent(o)||n.setEdge(e,u,{weight:0,minlen:i+a[o]})}function ko(n){var e={};function r(t,i){var a=n.children(t);a&&a.length&&c(a,function(o){r(o,i+1)}),e[t]=i}return c(n.children(),function(t){r(t,1)}),e}function Go(n){return J(n.edges(),function(e,r){return e+n.edge(r).weight},0)}function Bo(n){var e=n.graph();n.removeNode(e.nestingRoot),delete e.nestingRoot,c(n.edges(),function(r){var t=n.edge(r);t.nestingEdge&&n.removeEdge(r)})}function Yo(n,e,r){var t={},i;c(r,function(a){for(var o=n.parent(a),s,u;o;){if(s=n.parent(o),s?(u=t[s],t[s]=o):(u=i,i=o),u&&u!==o){e.setEdge(u,o);return}o=s}})}function Uo(n,e,r){var t=qo(n),i=new L({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(a){return n.node(a)});return c(n.nodes(),function(a){var o=n.node(a),s=n.parent(a);(o.rank===e||o.minRank<=e&&e<=o.maxRank)&&(i.setNode(a),i.setParent(a,s||t),c(n[r](a),function(u){var f=u.v===a?u.w:u.v,d=i.edge(f,a),h=y(d)?0:d.weight;i.setEdge(f,a,{weight:n.edge(u).weight+h})}),b(o,"minRank")&&i.setNode(a,{borderLeft:o.borderLeft[e],borderRight:o.borderRight[e]}))}),i}function qo(n){for(var e;n.hasNode(e=Un("_root")););return e}function Ho(n,e){for(var r=0,t=1;t<e.length;++t)r+=jo(n,e[t-1],e[t]);return r}function jo(n,e,r){for(var t=Qa(r,E(r,function(f,d){return d})),i=k(E(e,function(f){return Q(E(n.outEdges(f),function(d){return{pos:t[d.w],weight:n.edge(d).weight}}),"pos")})),a=1;a<r.length;)a<<=1;var o=2*a-1;a-=1;var s=E(new Array(o),function(){return 0}),u=0;return c(i.forEach(function(f){var d=f.pos+a;s[d]+=f.weight;for(var h=0;d>0;)d%2&&(h+=s[d+1]),d=d-1>>1,s[d]+=f.weight;u+=f.weight*h})),u}function Wo(n){var e={},r=A(n.nodes(),function(s){return!n.children(s).length}),t=S(E(r,function(s){return n.node(s).rank})),i=E(D(t+1),function(){return[]});function a(s){if(!b(e,s)){e[s]=!0;var u=n.node(s);i[u.rank].push(s),c(n.successors(s),a)}}var o=Q(r,function(s){return n.node(s).rank});return c(o,a),i}function Ko(n,e){return E(e,function(r){var t=n.inEdges(r);if(t.length){var i=J(t,function(a,o){var s=n.edge(o),u=n.node(o.v);return{sum:a.sum+s.weight*u.order,weight:a.weight+s.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}function Xo(n,e){var r={};c(n,function(i,a){var o=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:a};y(i.barycenter)||(o.barycenter=i.barycenter,o.weight=i.weight)}),c(e.edges(),function(i){var a=r[i.v],o=r[i.w];!y(a)&&!y(o)&&(o.indegree++,a.out.push(r[i.w]))});var t=A(r,function(i){return!i.indegree});return Vo(t)}function Vo(n){var e=[];function r(a){return function(o){o.merged||(y(o.barycenter)||y(a.barycenter)||o.barycenter>=a.barycenter)&&Zo(a,o)}}function t(a){return function(o){o.in.push(a),--o.indegree===0&&n.push(o)}}for(;n.length;){var i=n.pop();e.push(i),c(i.in.reverse(),r(i)),c(i.out,t(i))}return E(A(e,function(a){return!a.merged}),function(a){return un(a,["vs","i","barycenter","weight"])})}function Zo(n,e){var r=0,t=0;n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.vs=e.vs.concat(n.vs),n.barycenter=r/t,n.weight=t,n.i=Math.min(e.i,n.i),e.merged=!0}function Jo(n,e){var r=vo(n,function(d){return b(d,"barycenter")}),t=r.lhs,i=Q(r.rhs,function(d){return-d.i}),a=[],o=0,s=0,u=0;t.sort(Qo(!!e)),u=Ee(a,i,u),c(t,function(d){u+=d.vs.length,a.push(d.vs),o+=d.barycenter*d.weight,s+=d.weight,u=Ee(a,i,u)});var f={vs:k(a)};return s&&(f.barycenter=o/s,f.weight=s),f}function Ee(n,e,r){for(var t;e.length&&(t=sn(e)).i<=r;)e.pop(),n.push(t.vs),r++;return r}function Qo(n){return function(e,r){return e.barycenter<r.barycenter?-1:e.barycenter>r.barycenter?1:n?r.i-e.i:e.i-r.i}}function sr(n,e,r,t){var i=n.children(e),a=n.node(e),o=a?a.borderLeft:void 0,s=a?a.borderRight:void 0,u={};o&&(i=A(i,function(v){return v!==o&&v!==s}));var f=Ko(n,i);c(f,function(v){if(n.children(v.v).length){var p=sr(n,v.v,r,t);u[v.v]=p,b(p,"barycenter")&&ns(v,p)}});var d=Xo(f,r);zo(d,u);var h=Jo(d,t);if(o&&(h.vs=k([o,h.vs,s]),n.predecessors(o).length)){var l=n.node(n.predecessors(o)[0]),g=n.node(n.predecessors(s)[0]);b(h,"barycenter")||(h.barycenter=0,h.weight=0),h.barycenter=(h.barycenter*h.weight+l.order+g.order)/(h.weight+2),h.weight+=2}return h}function zo(n,e){c(n,function(r){r.vs=k(r.vs.map(function(t){return e[t]?e[t].vs:t}))})}function ns(n,e){y(n.barycenter)?(n.barycenter=e.barycenter,n.weight=e.weight):(n.barycenter=(n.barycenter*n.weight+e.barycenter*e.weight)/(n.weight+e.weight),n.weight+=e.weight)}function es(n){var e=Ze(n),r=ye(n,D(1,e+1),"inEdges"),t=ye(n,D(e-1,-1,-1),"outEdges"),i=Wo(n);xe(n,i);for(var a=Number.POSITIVE_INFINITY,o,s=0,u=0;u<4;++s,++u){rs(s%2?r:t,s%4>=2),i=pn(n);var f=Ho(n,i);f<a&&(u=0,o=yi(i),a=f)}xe(n,o)}function ye(n,e,r){return E(e,function(t){return Uo(n,t,r)})}function rs(n,e){var r=new L;c(n,function(t){var i=t.graph().root,a=sr(t,i,r,e);c(a.vs,function(o,s){t.node(o).order=s}),Yo(t,r,a.vs)})}function xe(n,e){c(e,function(r){c(r,function(t,i){n.node(t).order=i})})}function ts(n){var e=as(n);c(n.graph().dummyChains,function(r){for(var t=n.node(r),i=t.edgeObj,a=is(n,e,i.v,i.w),o=a.path,s=a.lca,u=0,f=o[u],d=!0;r!==i.w;){if(t=n.node(r),d){for(;(f=o[u])!==s&&n.node(f).maxRank<t.rank;)u++;f===s&&(d=!1)}if(!d){for(;u<o.length-1&&n.node(f=o[u+1]).minRank<=t.rank;)u++;f=o[u]}n.setParent(r,f),r=n.successors(r)[0]}})}function is(n,e,r,t){var i=[],a=[],o=Math.min(e[r].low,e[t].low),s=Math.max(e[r].lim,e[t].lim),u,f;u=r;do u=n.parent(u),i.push(u);while(u&&(e[u].low>o||s>e[u].lim));for(f=u,u=t;(u=n.parent(u))!==f;)a.push(u);return{path:i.concat(a.reverse()),lca:f}}function as(n){var e={},r=0;function t(i){var a=r;c(n.children(i),t),e[i]={low:a,lim:r++}}return c(n.children(),t),e}function os(n,e){var r={};function t(i,a){var o=0,s=0,u=i.length,f=sn(a);return c(a,function(d,h){var l=us(n,d),g=l?n.node(l).order:u;(l||d===f)&&(c(a.slice(s,h+1),function(v){c(n.predecessors(v),function(p){var m=n.node(p),_=m.order;(_<o||g<_)&&!(m.dummy&&n.node(v).dummy)&&ur(r,p,v)})}),s=h+1,o=g)}),a}return J(e,t),r}function ss(n,e){var r={};function t(a,o,s,u,f){var d;c(D(o,s),function(h){d=a[h],n.node(d).dummy&&c(n.predecessors(d),function(l){var g=n.node(l);g.dummy&&(g.order<u||g.order>f)&&ur(r,l,d)})})}function i(a,o){var s=-1,u,f=0;return c(o,function(d,h){if(n.node(d).dummy==="border"){var l=n.predecessors(d);l.length&&(u=n.node(l[0]).order,t(o,f,h,s,u),f=h,s=u)}t(o,f,o.length,u,a.length)}),o}return J(e,i),r}function us(n,e){if(n.node(e).dummy)return Gn(n.predecessors(e),function(r){return n.node(r).dummy})}function ur(n,e,r){if(e>r){var t=e;e=r,r=t}var i=n[e];i||(n[e]=i={}),i[r]=!0}function fs(n,e,r){if(e>r){var t=e;e=r,r=t}return b(n[e],r)}function ds(n,e,r,t){var i={},a={},o={};return c(e,function(s){c(s,function(u,f){i[u]=u,a[u]=u,o[u]=f})}),c(e,function(s){var u=-1;c(s,function(f){var d=t(f);if(d.length){d=Q(d,function(p){return o[p]});for(var h=(d.length-1)/2,l=Math.floor(h),g=Math.ceil(h);l<=g;++l){var v=d[l];a[f]===f&&u<o[v]&&!fs(r,f,v)&&(a[v]=f,a[f]=i[f]=i[v],u=o[v])}}})}),{root:i,align:a}}function cs(n,e,r,t,i){var a={},o=hs(n,e,r,i),s=i?"borderLeft":"borderRight";function u(h,l){for(var g=o.nodes(),v=g.pop(),p={};v;)p[v]?h(v):(p[v]=!0,g.push(v),g=g.concat(l(v))),v=g.pop()}function f(h){a[h]=o.inEdges(h).reduce(function(l,g){return Math.max(l,a[g.v]+o.edge(g))},0)}function d(h){var l=o.outEdges(h).reduce(function(v,p){return Math.min(v,a[p.w]-o.edge(p))},Number.POSITIVE_INFINITY),g=n.node(h);l!==Number.POSITIVE_INFINITY&&g.borderType!==s&&(a[h]=Math.max(a[h],l))}return u(f,o.predecessors.bind(o)),u(d,o.successors.bind(o)),c(t,function(h){a[h]=a[r[h]]}),a}function hs(n,e,r,t){var i=new L,a=n.graph(),o=bs(a.nodesep,a.edgesep,t);return c(e,function(s){var u;c(s,function(f){var d=r[f];if(i.setNode(d),u){var h=r[u],l=i.edge(h,d);i.setEdge(h,d,Math.max(o(n,f,u),l||0))}u=f})}),i}function ls(n,e){return Yn(N(e),function(r){var t=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return Ea(r,function(a,o){var s=ws(n,o)/2;t=Math.max(a+s,t),i=Math.min(a-s,i)}),t-i})}function vs(n,e){var r=N(e),t=W(r),i=S(r);c(["u","d"],function(a){c(["l","r"],function(o){var s=a+o,u=n[s],f;if(u!==e){var d=N(u);f=o==="l"?t-W(d):i-S(d),f&&(n[s]=gn(u,function(h){return h+f}))}})})}function gs(n,e){return gn(n.ul,function(r,t){if(e)return n[e.toLowerCase()][t];var i=Q(E(n,t));return(i[1]+i[2])/2})}function ps(n){var e=pn(n),r=An(os(n,e),ss(n,e)),t={},i;c(["u","d"],function(o){i=o==="u"?e:N(e).reverse(),c(["l","r"],function(s){s==="r"&&(i=E(i,function(h){return N(h).reverse()}));var u=(o==="u"?n.predecessors:n.successors).bind(n),f=ds(n,i,r,u),d=cs(n,i,f.root,f.align,s==="r");s==="r"&&(d=gn(d,function(h){return-h})),t[o+s]=d})});var a=ls(n,t);return vs(t,a),gs(t,n.graph().align)}function bs(n,e,r){return function(t,i,a){var o=t.node(i),s=t.node(a),u=0,f;if(u+=o.width/2,b(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":f=-o.width/2;break;case"r":f=o.width/2;break}if(f&&(u+=r?f:-f),f=0,u+=(o.dummy?e:n)/2,u+=(s.dummy?e:n)/2,u+=s.width/2,b(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":f=s.width/2;break;case"r":f=-s.width/2;break}return f&&(u+=r?f:-f),f=0,u}}function ws(n,e){return n.node(e).width}function ms(n){n=Ve(n),_s(n),ya(ps(n),function(e,r){n.node(r).x=e})}function _s(n){var e=pn(n),r=n.graph().ranksep,t=0;c(e,function(i){var a=S(E(i,function(o){return n.node(o).height}));c(i,function(o){n.node(o).y=t+a/2}),t+=a+r})}function js(n,e){var r=e&&e.debugTiming?go:po;r("layout",function(){var t=r(" buildLayoutGraph",function(){return Ps(n)});r(" runLayout",function(){Es(t,r)}),r(" updateInputGraph",function(){ys(n,t)})})}function Es(n,e){e(" makeSpaceForEdgeLabels",function(){$s(n)}),e(" removeSelfEdges",function(){Ys(n)}),e(" acyclic",function(){so(n)}),e(" nestingGraph.run",function(){Do(n)}),e(" rank",function(){Mo(Ve(n))}),e(" injectEdgeLabelProxies",function(){Ss(n)}),e(" removeEmptyRanks",function(){lo(n)}),e(" nestingGraph.cleanup",function(){Bo(n)}),e(" normalizeRanks",function(){ho(n)}),e(" assignRankMinMax",function(){Ms(n)}),e(" removeEdgeLabelProxies",function(){Rs(n)}),e(" normalize.run",function(){yo(n)}),e(" parentDummyChains",function(){ts(n)}),e(" addBorderSegments",function(){bo(n)}),e(" order",function(){es(n)}),e(" insertSelfEdges",function(){Us(n)}),e(" adjustCoordinateSystem",function(){wo(n)}),e(" position",function(){ms(n)}),e(" positionSelfEdges",function(){qs(n)}),e(" removeBorderNodes",function(){Bs(n)}),e(" normalize.undo",function(){To(n)}),e(" fixupEdgeLabelCoords",function(){ks(n)}),e(" undoCoordinateSystem",function(){mo(n)}),e(" translateGraph",function(){Fs(n)}),e(" assignNodeIntersects",function(){Ds(n)}),e(" reversePoints",function(){Gs(n)}),e(" acyclic.undo",function(){fo(n)})}function ys(n,e){c(n.nodes(),function(r){var t=n.node(r),i=e.node(r);t&&(t.x=i.x,t.y=i.y,e.children(r).length&&(t.width=i.width,t.height=i.height))}),c(n.edges(),function(r){var t=n.edge(r),i=e.edge(r);t.points=i.points,b(i,"x")&&(t.x=i.x,t.y=i.y)}),n.graph().width=e.graph().width,n.graph().height=e.graph().height}var xs=["nodesep","edgesep","ranksep","marginx","marginy"],Ts={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Ls=["acyclicer","ranker","rankdir","align"],As=["width","height"],Ns={width:0,height:0},Os=["minlen","weight","width","height","labeloffset"],Cs={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Is=["labelpos"];function Ps(n){var e=new L({multigraph:!0,compound:!0}),r=Tn(n.graph());return e.setGraph(An({},Ts,xn(r,xs),un(r,Ls))),c(n.nodes(),function(t){var i=Tn(n.node(t));e.setNode(t,va(xn(i,As),Ns)),e.setParent(t,n.parent(t))}),c(n.edges(),function(t){var i=Tn(n.edge(t));e.setEdge(t,An({},Cs,xn(i,Os),un(i,Is)))}),e}function $s(n){var e=n.graph();e.ranksep/=2,c(n.edges(),function(r){var t=n.edge(r);t.minlen*=2,t.labelpos.toLowerCase()!=="c"&&(e.rankdir==="TB"||e.rankdir==="BT"?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function Ss(n){c(n.edges(),function(e){var r=n.edge(e);if(r.width&&r.height){var t=n.node(e.v),i=n.node(e.w),a={rank:(i.rank-t.rank)/2+t.rank,e};G(n,"edge-proxy",a,"_ep")}})}function Ms(n){var e=0;c(n.nodes(),function(r){var t=n.node(r);t.borderTop&&(t.minRank=n.node(t.borderTop).rank,t.maxRank=n.node(t.borderBottom).rank,e=S(e,t.maxRank))}),n.graph().maxRank=e}function Rs(n){c(n.nodes(),function(e){var r=n.node(e);r.dummy==="edge-proxy"&&(n.edge(r.e).labelRank=r.rank,n.removeNode(e))})}function Fs(n){var e=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,i=0,a=n.graph(),o=a.marginx||0,s=a.marginy||0;function u(f){var d=f.x,h=f.y,l=f.width,g=f.height;e=Math.min(e,d-l/2),r=Math.max(r,d+l/2),t=Math.min(t,h-g/2),i=Math.max(i,h+g/2)}c(n.nodes(),function(f){u(n.node(f))}),c(n.edges(),function(f){var d=n.edge(f);b(d,"x")&&u(d)}),e-=o,t-=s,c(n.nodes(),function(f){var d=n.node(f);d.x-=e,d.y-=t}),c(n.edges(),function(f){var d=n.edge(f);c(d.points,function(h){h.x-=e,h.y-=t}),b(d,"x")&&(d.x-=e),b(d,"y")&&(d.y-=t)}),a.width=r-e+o,a.height=i-t+s}function Ds(n){c(n.edges(),function(e){var r=n.edge(e),t=n.node(e.v),i=n.node(e.w),a,o;r.points?(a=r.points[0],o=r.points[r.points.length-1]):(r.points=[],a=i,o=t),r.points.unshift(ge(t,a)),r.points.push(ge(i,o))})}function ks(n){c(n.edges(),function(e){var r=n.edge(e);if(b(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function Gs(n){c(n.edges(),function(e){var r=n.edge(e);r.reversed&&r.points.reverse()})}function Bs(n){c(n.nodes(),function(e){if(n.children(e).length){var r=n.node(e),t=n.node(r.borderTop),i=n.node(r.borderBottom),a=n.node(sn(r.borderLeft)),o=n.node(sn(r.borderRight));r.width=Math.abs(o.x-a.x),r.height=Math.abs(i.y-t.y),r.x=a.x+r.width/2,r.y=t.y+r.height/2}}),c(n.nodes(),function(e){n.node(e).dummy==="border"&&n.removeNode(e)})}function Ys(n){c(n.edges(),function(e){if(e.v===e.w){var r=n.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e,label:n.edge(e)}),n.removeEdge(e)}})}function Us(n){var e=pn(n);c(e,function(r){var t=0;c(r,function(i,a){var o=n.node(i);o.order=a+t,c(o.selfEdges,function(s){G(n,"selfedge",{width:s.label.width,height:s.label.height,rank:o.rank,order:a+ ++t,e:s.e,label:s.label},"_se")}),delete o.selfEdges})})}function qs(n){c(n.nodes(),function(e){var r=n.node(e);if(r.dummy==="selfedge"){var t=n.node(r.e.v),i=t.x+t.width/2,a=t.y,o=r.x-i,s=t.height/2;n.setEdge(r.e,r.label),n.removeNode(e),r.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],r.label.x=r.x,r.label.y=r.y}})}function xn(n,e){return gn(un(n,e),Number)}function Tn(n){var e={};return c(n,function(r,t){e[t.toLowerCase()]=r}),e}export{L as G,tn as b,va as d,c as f,b as h,y as i,js as l,E as m,un as p,D as r,Un as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h}from"./array-9f3ba611.js";import{w as d,c as o}from"./path-53f90ab3.js";import{n as v}from"./index-
|
|
1
|
+
import{a as h}from"./array-9f3ba611.js";import{w as d,c as o}from"./path-53f90ab3.js";import{n as v}from"./index-e793d777.js";function w(t){return t[0]}function b(t){return t[1]}function P(t,u){var s=o(!0),i=null,l=v,r=null,m=d(e);t=typeof t=="function"?t:t===void 0?w:o(t),u=typeof u=="function"?u:u===void 0?b:o(u);function e(n){var f,g=(n=h(n)).length,p,c=!1,a;for(i==null&&(r=l(a=m())),f=0;f<=g;++f)!(f<g&&s(p=n[f],f,n))===c&&((c=!c)?r.lineStart():r.lineEnd()),c&&r.point(+t(p,f,n),+u(p,f,n));if(a)return r=null,a+""||null}return e.x=function(n){return arguments.length?(t=typeof n=="function"?n:o(+n),e):t},e.y=function(n){return arguments.length?(u=typeof n=="function"?n:o(+n),e):u},e.defined=function(n){return arguments.length?(s=typeof n=="function"?n:o(!!n),e):s},e.curve=function(n){return arguments.length?(l=n,i!=null&&(r=l(i)),e):l},e.context=function(n){return arguments.length?(n==null?i=r=null:r=l(i=n),e):i},e}export{P as l};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a0 as un,a1 as I,a2 as U,a3 as Y,a4 as fn}from"./index-37817b51.js";import{i as cn}from"./init-77b53fdd.js";function F(n,t){return n==null||t==null?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function hn(n,t){return n==null||t==null?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function _(n){let t,e,r;n.length!==2?(t=F,e=(u,c)=>F(n(u),c),r=(u,c)=>n(u)-c):(t=n===F||n===hn?n:mn,e=n,r=n);function i(u,c,o=0,l=u.length){if(o<l){if(t(c,c)!==0)return l;do{const h=o+l>>>1;e(u[h],c)<0?o=h+1:l=h}while(o<l)}return o}function f(u,c,o=0,l=u.length){if(o<l){if(t(c,c)!==0)return l;do{const h=o+l>>>1;e(u[h],c)<=0?o=h+1:l=h}while(o<l)}return o}function a(u,c,o=0,l=u.length){const h=i(u,c,o,l-1);return h>o&&r(u[h-1],c)>-r(u[h],c)?h-1:h}return{left:i,center:a,right:f}}function mn(){return 0}function sn(n){return n===null?NaN:+n}const ln=_(F),dn=ln.right;_(sn).center;const gn=dn,yn=Math.sqrt(50),Mn=Math.sqrt(10),pn=Math.sqrt(2);function R(n,t,e){const r=(t-n)/Math.max(0,e),i=Math.floor(Math.log10(r)),f=r/Math.pow(10,i),a=f>=yn?10:f>=Mn?5:f>=pn?2:1;let u,c,o;return i<0?(o=Math.pow(10,-i)/a,u=Math.round(n*o),c=Math.round(t*o),u/o<n&&++u,c/o>t&&--c,o=-o):(o=Math.pow(10,i)*a,u=Math.round(n/o),c=Math.round(t/o),u*o<n&&++u,c*o>t&&--c),c<u&&.5<=e&&e<2?R(n,t,e*2):[u,c,o]}function wn(n,t,e){if(t=+t,n=+n,e=+e,!(e>0))return[];if(n===t)return[n];const r=t<n,[i,f,a]=r?R(t,n,e):R(n,t,e);if(!(f>=i))return[];const u=f-i+1,c=new Array(u);if(r)if(a<0)for(let o=0;o<u;++o)c[o]=(f-o)/-a;else for(let o=0;o<u;++o)c[o]=(f-o)*a;else if(a<0)for(let o=0;o<u;++o)c[o]=(i+o)/-a;else for(let o=0;o<u;++o)c[o]=(i+o)*a;return c}function L(n,t,e){return t=+t,n=+n,e=+e,R(n,t,e)[2]}function Nn(n,t,e){t=+t,n=+n,e=+e;const r=t<n,i=r?L(t,n,e):L(n,t,e);return(r?-1:1)*(i<0?1/-i:i)}function kn(n,t){t||(t=[]);var e=n?Math.min(t.length,n.length):0,r=t.slice(),i;return function(f){for(i=0;i<e;++i)r[i]=n[i]*(1-f)+t[i]*f;return r}}function xn(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function An(n,t){var e=t?t.length:0,r=n?Math.min(e,n.length):0,i=new Array(r),f=new Array(e),a;for(a=0;a<r;++a)i[a]=C(n[a],t[a]);for(;a<e;++a)f[a]=t[a];return function(u){for(a=0;a<r;++a)f[a]=i[a](u);return f}}function vn(n,t){var e=new Date;return n=+n,t=+t,function(r){return e.setTime(n*(1-r)+t*r),e}}function Sn(n,t){var e={},r={},i;(n===null||typeof n!="object")&&(n={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in n?e[i]=C(n[i],t[i]):r[i]=t[i];return function(f){for(i in e)r[i]=e[i](f);return r}}function C(n,t){var e=typeof t,r;return t==null||e==="boolean"?un(t):(e==="number"?I:e==="string"?(r=U(t))?(t=r,Y):fn:t instanceof U?Y:t instanceof Date?vn:xn(t)?kn:Array.isArray(t)?An:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Sn:I)(n,t)}function bn(n,t){return n=+n,t=+t,function(e){return Math.round(n*(1-e)+t*e)}}function jn(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function E(n,t){if((e=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"))<0)return null;var e,r=n.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+n.slice(e+1)]}function v(n){return n=E(Math.abs(n)),n?n[1]:NaN}function Pn(n,t){return function(e,r){for(var i=e.length,f=[],a=0,u=n[0],c=0;i>0&&u>0&&(c+u+1>r&&(u=Math.max(1,r-c)),f.push(e.substring(i-=u,i+u)),!((c+=u+1)>r));)u=n[a=(a+1)%n.length];return f.reverse().join(t)}}function zn(n){return function(t){return t.replace(/[0-9]/g,function(e){return n[+e]})}}var $n=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function D(n){if(!(t=$n.exec(n)))throw new Error("invalid format: "+n);var t;return new B({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}D.prototype=B.prototype;function B(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}B.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Fn(n){n:for(var t=n.length,e=1,r=-1,i;e<t;++e)switch(n[e]){case".":r=i=e;break;case"0":r===0&&(r=e),i=e;break;default:if(!+n[e])break n;r>0&&(r=0);break}return r>0?n.slice(0,r)+n.slice(i+1):n}var nn;function Rn(n,t){var e=E(n,t);if(!e)return n+"";var r=e[0],i=e[1],f=i-(nn=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return f===a?r:f>a?r+new Array(f-a+1).join("0"):f>0?r.slice(0,f)+"."+r.slice(f):"0."+new Array(1-f).join("0")+E(n,Math.max(0,t+f-1))[0]}function Z(n,t){var e=E(n,t);if(!e)return n+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const H={"%":(n,t)=>(n*100).toFixed(t),b:n=>Math.round(n).toString(2),c:n=>n+"",d:jn,e:(n,t)=>n.toExponential(t),f:(n,t)=>n.toFixed(t),g:(n,t)=>n.toPrecision(t),o:n=>Math.round(n).toString(8),p:(n,t)=>Z(n*100,t),r:Z,s:Rn,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function J(n){return n}var K=Array.prototype.map,Q=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function En(n){var t=n.grouping===void 0||n.thousands===void 0?J:Pn(K.call(n.grouping,Number),n.thousands+""),e=n.currency===void 0?"":n.currency[0]+"",r=n.currency===void 0?"":n.currency[1]+"",i=n.decimal===void 0?".":n.decimal+"",f=n.numerals===void 0?J:zn(K.call(n.numerals,String)),a=n.percent===void 0?"%":n.percent+"",u=n.minus===void 0?"−":n.minus+"",c=n.nan===void 0?"NaN":n.nan+"";function o(h){h=D(h);var s=h.fill,p=h.align,y=h.sign,S=h.symbol,k=h.zero,b=h.width,T=h.comma,w=h.precision,G=h.trim,d=h.type;d==="n"?(T=!0,d="g"):H[d]||(w===void 0&&(w=12),G=!0,d="g"),(k||s==="0"&&p==="=")&&(k=!0,s="0",p="=");var en=S==="$"?e:S==="#"&&/[boxX]/.test(d)?"0"+d.toLowerCase():"",on=S==="$"?r:/[%p]/.test(d)?a:"",O=H[d],an=/[defgprs%]/.test(d);w=w===void 0?6:/[gprs]/.test(d)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function V(m){var N=en,g=on,x,X,j;if(d==="c")g=O(m)+g,m="";else{m=+m;var P=m<0||1/m<0;if(m=isNaN(m)?c:O(Math.abs(m),w),G&&(m=Fn(m)),P&&+m==0&&y!=="+"&&(P=!1),N=(P?y==="("?y:u:y==="-"||y==="("?"":y)+N,g=(d==="s"?Q[8+nn/3]:"")+g+(P&&y==="("?")":""),an){for(x=-1,X=m.length;++x<X;)if(j=m.charCodeAt(x),48>j||j>57){g=(j===46?i+m.slice(x+1):m.slice(x))+g,m=m.slice(0,x);break}}}T&&!k&&(m=t(m,1/0));var z=N.length+m.length+g.length,M=z<b?new Array(b-z+1).join(s):"";switch(T&&k&&(m=t(M+m,M.length?b-g.length:1/0),M=""),p){case"<":m=N+m+g+M;break;case"=":m=N+M+m+g;break;case"^":m=M.slice(0,z=M.length>>1)+N+m+g+M.slice(z);break;default:m=M+N+m+g;break}return f(m)}return V.toString=function(){return h+""},V}function l(h,s){var p=o((h=D(h),h.type="f",h)),y=Math.max(-8,Math.min(8,Math.floor(v(s)/3)))*3,S=Math.pow(10,-y),k=Q[8+y/3];return function(b){return p(S*b)+k}}return{format:o,formatPrefix:l}}var $,tn,rn;Dn({thousands:",",grouping:[3],currency:["$",""]});function Dn(n){return $=En(n),tn=$.format,rn=$.formatPrefix,$}function Tn(n){return Math.max(0,-v(Math.abs(n)))}function In(n,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(v(t)/3)))*3-v(Math.abs(n)))}function Ln(n,t){return n=Math.abs(n),t=Math.abs(t)-n,Math.max(0,v(t)-v(n))+1}function qn(n){return function(){return n}}function Cn(n){return+n}var W=[0,1];function A(n){return n}function q(n,t){return(t-=n=+n)?function(e){return(e-n)/t}:qn(isNaN(t)?NaN:.5)}function Bn(n,t){var e;return n>t&&(e=n,n=t,t=e),function(r){return Math.max(n,Math.min(t,r))}}function Gn(n,t,e){var r=n[0],i=n[1],f=t[0],a=t[1];return i<r?(r=q(i,r),f=e(a,f)):(r=q(r,i),f=e(f,a)),function(u){return f(r(u))}}function On(n,t,e){var r=Math.min(n.length,t.length)-1,i=new Array(r),f=new Array(r),a=-1;for(n[r]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=q(n[a],n[a+1]),f[a]=e(t[a],t[a+1]);return function(u){var c=gn(n,u,1,r)-1;return f[c](i[c](u))}}function Vn(n,t){return t.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function Xn(){var n=W,t=W,e=C,r,i,f,a=A,u,c,o;function l(){var s=Math.min(n.length,t.length);return a!==A&&(a=Bn(n[0],n[s-1])),u=s>2?On:Gn,c=o=null,h}function h(s){return s==null||isNaN(s=+s)?f:(c||(c=u(n.map(r),t,e)))(r(a(s)))}return h.invert=function(s){return a(i((o||(o=u(t,n.map(r),I)))(s)))},h.domain=function(s){return arguments.length?(n=Array.from(s,Cn),l()):n.slice()},h.range=function(s){return arguments.length?(t=Array.from(s),l()):t.slice()},h.rangeRound=function(s){return t=Array.from(s),e=bn,l()},h.clamp=function(s){return arguments.length?(a=s?!0:A,l()):a!==A},h.interpolate=function(s){return arguments.length?(e=s,l()):e},h.unknown=function(s){return arguments.length?(f=s,h):f},function(s,p){return r=s,i=p,l()}}function Un(){return Xn()(A,A)}function Yn(n,t,e,r){var i=Nn(n,t,e),f;switch(r=D(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(t));return r.precision==null&&!isNaN(f=In(i,a))&&(r.precision=f),rn(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(f=Ln(i,Math.max(Math.abs(n),Math.abs(t))))&&(r.precision=f-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(f=Tn(i))&&(r.precision=f-(r.type==="%")*2);break}}return tn(r)}function Zn(n){var t=n.domain;return n.ticks=function(e){var r=t();return wn(r[0],r[r.length-1],e??10)},n.tickFormat=function(e,r){var i=t();return Yn(i[0],i[i.length-1],e??10,r)},n.nice=function(e){e==null&&(e=10);var r=t(),i=0,f=r.length-1,a=r[i],u=r[f],c,o,l=10;for(u<a&&(o=a,a=u,u=o,o=i,i=f,f=o);l-- >0;){if(o=L(a,u,e),o===c)return r[i]=a,r[f]=u,t(r);if(o>0)a=Math.floor(a/o)*o,u=Math.ceil(u/o)*o;else if(o<0)a=Math.ceil(a*o)/o,u=Math.floor(u*o)/o;else break;c=o}return n},n}function Hn(){var n=Un();return n.copy=function(){return Vn(n,Hn())},cn.apply(n,arguments),Zn(n)}export{Vn as a,_ as b,Un as c,Hn as l,Nn as t};
|
|
1
|
+
import{a0 as un,a1 as I,a2 as U,a3 as Y,a4 as fn}from"./index-e793d777.js";import{i as cn}from"./init-77b53fdd.js";function F(n,t){return n==null||t==null?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function hn(n,t){return n==null||t==null?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function _(n){let t,e,r;n.length!==2?(t=F,e=(u,c)=>F(n(u),c),r=(u,c)=>n(u)-c):(t=n===F||n===hn?n:mn,e=n,r=n);function i(u,c,o=0,l=u.length){if(o<l){if(t(c,c)!==0)return l;do{const h=o+l>>>1;e(u[h],c)<0?o=h+1:l=h}while(o<l)}return o}function f(u,c,o=0,l=u.length){if(o<l){if(t(c,c)!==0)return l;do{const h=o+l>>>1;e(u[h],c)<=0?o=h+1:l=h}while(o<l)}return o}function a(u,c,o=0,l=u.length){const h=i(u,c,o,l-1);return h>o&&r(u[h-1],c)>-r(u[h],c)?h-1:h}return{left:i,center:a,right:f}}function mn(){return 0}function sn(n){return n===null?NaN:+n}const ln=_(F),dn=ln.right;_(sn).center;const gn=dn,yn=Math.sqrt(50),Mn=Math.sqrt(10),pn=Math.sqrt(2);function R(n,t,e){const r=(t-n)/Math.max(0,e),i=Math.floor(Math.log10(r)),f=r/Math.pow(10,i),a=f>=yn?10:f>=Mn?5:f>=pn?2:1;let u,c,o;return i<0?(o=Math.pow(10,-i)/a,u=Math.round(n*o),c=Math.round(t*o),u/o<n&&++u,c/o>t&&--c,o=-o):(o=Math.pow(10,i)*a,u=Math.round(n/o),c=Math.round(t/o),u*o<n&&++u,c*o>t&&--c),c<u&&.5<=e&&e<2?R(n,t,e*2):[u,c,o]}function wn(n,t,e){if(t=+t,n=+n,e=+e,!(e>0))return[];if(n===t)return[n];const r=t<n,[i,f,a]=r?R(t,n,e):R(n,t,e);if(!(f>=i))return[];const u=f-i+1,c=new Array(u);if(r)if(a<0)for(let o=0;o<u;++o)c[o]=(f-o)/-a;else for(let o=0;o<u;++o)c[o]=(f-o)*a;else if(a<0)for(let o=0;o<u;++o)c[o]=(i+o)/-a;else for(let o=0;o<u;++o)c[o]=(i+o)*a;return c}function L(n,t,e){return t=+t,n=+n,e=+e,R(n,t,e)[2]}function Nn(n,t,e){t=+t,n=+n,e=+e;const r=t<n,i=r?L(t,n,e):L(n,t,e);return(r?-1:1)*(i<0?1/-i:i)}function kn(n,t){t||(t=[]);var e=n?Math.min(t.length,n.length):0,r=t.slice(),i;return function(f){for(i=0;i<e;++i)r[i]=n[i]*(1-f)+t[i]*f;return r}}function xn(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function An(n,t){var e=t?t.length:0,r=n?Math.min(e,n.length):0,i=new Array(r),f=new Array(e),a;for(a=0;a<r;++a)i[a]=C(n[a],t[a]);for(;a<e;++a)f[a]=t[a];return function(u){for(a=0;a<r;++a)f[a]=i[a](u);return f}}function vn(n,t){var e=new Date;return n=+n,t=+t,function(r){return e.setTime(n*(1-r)+t*r),e}}function Sn(n,t){var e={},r={},i;(n===null||typeof n!="object")&&(n={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in n?e[i]=C(n[i],t[i]):r[i]=t[i];return function(f){for(i in e)r[i]=e[i](f);return r}}function C(n,t){var e=typeof t,r;return t==null||e==="boolean"?un(t):(e==="number"?I:e==="string"?(r=U(t))?(t=r,Y):fn:t instanceof U?Y:t instanceof Date?vn:xn(t)?kn:Array.isArray(t)?An:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Sn:I)(n,t)}function bn(n,t){return n=+n,t=+t,function(e){return Math.round(n*(1-e)+t*e)}}function jn(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function E(n,t){if((e=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"))<0)return null;var e,r=n.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+n.slice(e+1)]}function v(n){return n=E(Math.abs(n)),n?n[1]:NaN}function Pn(n,t){return function(e,r){for(var i=e.length,f=[],a=0,u=n[0],c=0;i>0&&u>0&&(c+u+1>r&&(u=Math.max(1,r-c)),f.push(e.substring(i-=u,i+u)),!((c+=u+1)>r));)u=n[a=(a+1)%n.length];return f.reverse().join(t)}}function zn(n){return function(t){return t.replace(/[0-9]/g,function(e){return n[+e]})}}var $n=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function D(n){if(!(t=$n.exec(n)))throw new Error("invalid format: "+n);var t;return new B({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}D.prototype=B.prototype;function B(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}B.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Fn(n){n:for(var t=n.length,e=1,r=-1,i;e<t;++e)switch(n[e]){case".":r=i=e;break;case"0":r===0&&(r=e),i=e;break;default:if(!+n[e])break n;r>0&&(r=0);break}return r>0?n.slice(0,r)+n.slice(i+1):n}var nn;function Rn(n,t){var e=E(n,t);if(!e)return n+"";var r=e[0],i=e[1],f=i-(nn=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return f===a?r:f>a?r+new Array(f-a+1).join("0"):f>0?r.slice(0,f)+"."+r.slice(f):"0."+new Array(1-f).join("0")+E(n,Math.max(0,t+f-1))[0]}function Z(n,t){var e=E(n,t);if(!e)return n+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const H={"%":(n,t)=>(n*100).toFixed(t),b:n=>Math.round(n).toString(2),c:n=>n+"",d:jn,e:(n,t)=>n.toExponential(t),f:(n,t)=>n.toFixed(t),g:(n,t)=>n.toPrecision(t),o:n=>Math.round(n).toString(8),p:(n,t)=>Z(n*100,t),r:Z,s:Rn,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function J(n){return n}var K=Array.prototype.map,Q=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function En(n){var t=n.grouping===void 0||n.thousands===void 0?J:Pn(K.call(n.grouping,Number),n.thousands+""),e=n.currency===void 0?"":n.currency[0]+"",r=n.currency===void 0?"":n.currency[1]+"",i=n.decimal===void 0?".":n.decimal+"",f=n.numerals===void 0?J:zn(K.call(n.numerals,String)),a=n.percent===void 0?"%":n.percent+"",u=n.minus===void 0?"−":n.minus+"",c=n.nan===void 0?"NaN":n.nan+"";function o(h){h=D(h);var s=h.fill,p=h.align,y=h.sign,S=h.symbol,k=h.zero,b=h.width,T=h.comma,w=h.precision,G=h.trim,d=h.type;d==="n"?(T=!0,d="g"):H[d]||(w===void 0&&(w=12),G=!0,d="g"),(k||s==="0"&&p==="=")&&(k=!0,s="0",p="=");var en=S==="$"?e:S==="#"&&/[boxX]/.test(d)?"0"+d.toLowerCase():"",on=S==="$"?r:/[%p]/.test(d)?a:"",O=H[d],an=/[defgprs%]/.test(d);w=w===void 0?6:/[gprs]/.test(d)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function V(m){var N=en,g=on,x,X,j;if(d==="c")g=O(m)+g,m="";else{m=+m;var P=m<0||1/m<0;if(m=isNaN(m)?c:O(Math.abs(m),w),G&&(m=Fn(m)),P&&+m==0&&y!=="+"&&(P=!1),N=(P?y==="("?y:u:y==="-"||y==="("?"":y)+N,g=(d==="s"?Q[8+nn/3]:"")+g+(P&&y==="("?")":""),an){for(x=-1,X=m.length;++x<X;)if(j=m.charCodeAt(x),48>j||j>57){g=(j===46?i+m.slice(x+1):m.slice(x))+g,m=m.slice(0,x);break}}}T&&!k&&(m=t(m,1/0));var z=N.length+m.length+g.length,M=z<b?new Array(b-z+1).join(s):"";switch(T&&k&&(m=t(M+m,M.length?b-g.length:1/0),M=""),p){case"<":m=N+m+g+M;break;case"=":m=N+M+m+g;break;case"^":m=M.slice(0,z=M.length>>1)+N+m+g+M.slice(z);break;default:m=M+N+m+g;break}return f(m)}return V.toString=function(){return h+""},V}function l(h,s){var p=o((h=D(h),h.type="f",h)),y=Math.max(-8,Math.min(8,Math.floor(v(s)/3)))*3,S=Math.pow(10,-y),k=Q[8+y/3];return function(b){return p(S*b)+k}}return{format:o,formatPrefix:l}}var $,tn,rn;Dn({thousands:",",grouping:[3],currency:["$",""]});function Dn(n){return $=En(n),tn=$.format,rn=$.formatPrefix,$}function Tn(n){return Math.max(0,-v(Math.abs(n)))}function In(n,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(v(t)/3)))*3-v(Math.abs(n)))}function Ln(n,t){return n=Math.abs(n),t=Math.abs(t)-n,Math.max(0,v(t)-v(n))+1}function qn(n){return function(){return n}}function Cn(n){return+n}var W=[0,1];function A(n){return n}function q(n,t){return(t-=n=+n)?function(e){return(e-n)/t}:qn(isNaN(t)?NaN:.5)}function Bn(n,t){var e;return n>t&&(e=n,n=t,t=e),function(r){return Math.max(n,Math.min(t,r))}}function Gn(n,t,e){var r=n[0],i=n[1],f=t[0],a=t[1];return i<r?(r=q(i,r),f=e(a,f)):(r=q(r,i),f=e(f,a)),function(u){return f(r(u))}}function On(n,t,e){var r=Math.min(n.length,t.length)-1,i=new Array(r),f=new Array(r),a=-1;for(n[r]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=q(n[a],n[a+1]),f[a]=e(t[a],t[a+1]);return function(u){var c=gn(n,u,1,r)-1;return f[c](i[c](u))}}function Vn(n,t){return t.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function Xn(){var n=W,t=W,e=C,r,i,f,a=A,u,c,o;function l(){var s=Math.min(n.length,t.length);return a!==A&&(a=Bn(n[0],n[s-1])),u=s>2?On:Gn,c=o=null,h}function h(s){return s==null||isNaN(s=+s)?f:(c||(c=u(n.map(r),t,e)))(r(a(s)))}return h.invert=function(s){return a(i((o||(o=u(t,n.map(r),I)))(s)))},h.domain=function(s){return arguments.length?(n=Array.from(s,Cn),l()):n.slice()},h.range=function(s){return arguments.length?(t=Array.from(s),l()):t.slice()},h.rangeRound=function(s){return t=Array.from(s),e=bn,l()},h.clamp=function(s){return arguments.length?(a=s?!0:A,l()):a!==A},h.interpolate=function(s){return arguments.length?(e=s,l()):e},h.unknown=function(s){return arguments.length?(f=s,h):f},function(s,p){return r=s,i=p,l()}}function Un(){return Xn()(A,A)}function Yn(n,t,e,r){var i=Nn(n,t,e),f;switch(r=D(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(t));return r.precision==null&&!isNaN(f=In(i,a))&&(r.precision=f),rn(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(f=Ln(i,Math.max(Math.abs(n),Math.abs(t))))&&(r.precision=f-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(f=Tn(i))&&(r.precision=f-(r.type==="%")*2);break}}return tn(r)}function Zn(n){var t=n.domain;return n.ticks=function(e){var r=t();return wn(r[0],r[r.length-1],e??10)},n.tickFormat=function(e,r){var i=t();return Yn(i[0],i[i.length-1],e??10,r)},n.nice=function(e){e==null&&(e=10);var r=t(),i=0,f=r.length-1,a=r[i],u=r[f],c,o,l=10;for(u<a&&(o=a,a=u,u=o,o=i,i=f,f=o);l-- >0;){if(o=L(a,u,e),o===c)return r[i]=a,r[f]=u,t(r);if(o>0)a=Math.floor(a/o)*o,u=Math.ceil(u/o)*o;else if(o<0)a=Math.ceil(a*o)/o,u=Math.floor(u*o)/o;else break;c=o}return n},n}function Hn(){var n=Un();return n.copy=function(){return Vn(n,Hn())},cn.apply(n,arguments),Zn(n)}export{Vn as a,_ as b,Un as c,Hn as l,Nn as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{P as Da,Q as _u,d as Ep,c as sn,l as qr,h as ti,r as wp,aT as xp,aU as Tp,aV as Cp}from"./index-
|
|
1
|
+
import{P as Da,Q as _u,d as Ep,c as sn,l as qr,h as ti,r as wp,aT as xp,aU as Tp,aV as Cp}from"./index-e793d777.js";import{a as Dp}from"./createText-62fc7601-89c73b31.js";var Uu={exports:{}};(function(pe,le){(function(ee,ce){pe.exports=ce()})(Da,function(){function ee(t){"@babel/helpers - typeof";return ee=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ee(t)}function ce(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function H(t,e){for(var r=0;r<e.length;r++){var a=e[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function O(t,e,r){return e&&H(t.prototype,e),r&&H(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function T(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function w(t,e){return S(t)||G(t,e)||U(t,e)||K()}function S(t){if(Array.isArray(t))return t}function G(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var a=[],n=!0,i=!1,s,o;try{for(r=r.call(t);!(n=(s=r.next()).done)&&(a.push(s.value),!(e&&a.length===e));n=!0);}catch(l){i=!0,o=l}finally{try{!n&&r.return!=null&&r.return()}finally{if(i)throw o}}return a}}function U(t,e){if(t){if(typeof t=="string")return P(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return P(t,e)}}function P(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,a=new Array(e);r<e;r++)a[r]=t[r];return a}function K(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var D=typeof window>"u"?null:window,$=D?D.navigator:null;D&&D.document;var _=ee(""),Q=ee({}),ne=ee(function(){}),oe=typeof HTMLElement>"u"?"undefined":ee(HTMLElement),J=function(e){return e&&e.instanceString&&Y(e.instanceString)?e.instanceString():null},j=function(e){return e!=null&&ee(e)==_},Y=function(e){return e!=null&&ee(e)===ne},te=function(e){return!de(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},L=function(e){return e!=null&&ee(e)===Q&&!te(e)&&e.constructor===Object},V=function(e){return e!=null&&ee(e)===Q},I=function(e){return e!=null&&ee(e)===ee(1)&&!isNaN(e)},W=function(e){return I(e)&&Math.floor(e)===e},fe=function(e){if(oe!=="undefined")return e!=null&&e instanceof HTMLElement},de=function(e){return Ae(e)||Ne(e)},Ae=function(e){return J(e)==="collection"&&e._private.single},Ne=function(e){return J(e)==="collection"&&!e._private.single},_e=function(e){return J(e)==="core"},tt=function(e){return J(e)==="stylesheet"},vt=function(e){return J(e)==="event"},Pe=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},Ve=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},Xe=function(e){return L(e)&&I(e.x1)&&I(e.x2)&&I(e.y1)&&I(e.y2)},rt=function(e){return V(e)&&Y(e.then)},ft=function(){return $&&$.userAgent.match(/msie|trident|edge/i)},at=function(e,r){r||(r=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var i=[],s=0;s<arguments.length;s++)i.push(arguments[s]);return i.join("$")});var a=function n(){var i=this,s=arguments,o,l=r.apply(i,s),u=n.cache;return(o=u[l])||(o=u[l]=e.apply(i,s)),o};return a.cache={},a},et=at(function(t){return t.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),yt=at(function(t){return t.replace(/(-\w)/g,function(e){return e[1].toUpperCase()})}),wt=at(function(t,e){return t+e[0].toUpperCase()+e.substring(1)},function(t,e){return t+"$"+e}),Pt=function(e){return Pe(e)?e:e.charAt(0).toUpperCase()+e.substring(1)},dt="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",dr="rgb[a]?\\(("+dt+"[%]?)\\s*,\\s*("+dt+"[%]?)\\s*,\\s*("+dt+"[%]?)(?:\\s*,\\s*("+dt+"))?\\)",qt="rgb[a]?\\((?:"+dt+"[%]?)\\s*,\\s*(?:"+dt+"[%]?)\\s*,\\s*(?:"+dt+"[%]?)(?:\\s*,\\s*(?:"+dt+"))?\\)",un="hsl[a]?\\(("+dt+")\\s*,\\s*("+dt+"[%])\\s*,\\s*("+dt+"[%])(?:\\s*,\\s*("+dt+"))?\\)",Zr="hsl[a]?\\((?:"+dt+")\\s*,\\s*(?:"+dt+"[%])\\s*,\\s*(?:"+dt+"[%])(?:\\s*,\\s*(?:"+dt+"))?\\)",Sa="\\#[0-9a-fA-F]{3}",er="\\#[0-9a-fA-F]{6}",ji=function(e,r){return e<r?-1:e>r?1:0},ju=function(e,r){return-1*ji(e,r)},Ue=Object.assign!=null?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r<e.length;r++){var a=e[r];if(a!=null)for(var n=Object.keys(a),i=0;i<n.length;i++){var s=n[i];t[s]=a[s]}}return t},el=function(e){if(!(!(e.length===4||e.length===7)||e[0]!=="#")){var r=e.length===4,a,n,i,s=16;return r?(a=parseInt(e[1]+e[1],s),n=parseInt(e[2]+e[2],s),i=parseInt(e[3]+e[3],s)):(a=parseInt(e[1]+e[2],s),n=parseInt(e[3]+e[4],s),i=parseInt(e[5]+e[6],s)),[a,n,i]}},tl=function(e){var r,a,n,i,s,o,l,u;function f(v,p,y){return y<0&&(y+=1),y>1&&(y-=1),y<1/6?v+(p-v)*6*y:y<1/2?p:y<2/3?v+(p-v)*(2/3-y)*6:v}var h=new RegExp("^"+un+"$").exec(e);if(h){if(a=parseInt(h[1]),a<0?a=(360- -1*a%360)%360:a>360&&(a=a%360),a/=360,n=parseFloat(h[2]),n<0||n>100||(n=n/100,i=parseFloat(h[3]),i<0||i>100)||(i=i/100,s=h[4],s!==void 0&&(s=parseFloat(s),s<0||s>1)))return;if(n===0)o=l=u=Math.round(i*255);else{var c=i<.5?i*(1+n):i+n-i*n,d=2*i-c;o=Math.round(255*f(d,c,a+1/3)),l=Math.round(255*f(d,c,a)),u=Math.round(255*f(d,c,a-1/3))}r=[o,l,u,s]}return r},rl=function(e){var r,a=new RegExp("^"+dr+"$").exec(e);if(a){r=[];for(var n=[],i=1;i<=3;i++){var s=a[i];if(s[s.length-1]==="%"&&(n[i]=!0),s=parseFloat(s),n[i]&&(s=s/100*255),s<0||s>255)return;r.push(Math.floor(s))}var o=n[1]||n[2]||n[3],l=n[1]&&n[2]&&n[3];if(o&&!l)return;var u=a[4];if(u!==void 0){if(u=parseFloat(u),u<0||u>1)return;r.push(u)}}return r},al=function(e){return il[e.toLowerCase()]},nl=function(e){return(te(e)?e:null)||al(e)||el(e)||rl(e)||tl(e)},il={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},es=function(e){for(var r=e.map,a=e.keys,n=a.length,i=0;i<n;i++){var s=a[i];if(L(s))throw Error("Tried to set map with object key");i<a.length-1?(r[s]==null&&(r[s]={}),r=r[s]):r[s]=e.value}},ts=function(e){for(var r=e.map,a=e.keys,n=a.length,i=0;i<n;i++){var s=a[i];if(L(s))throw Error("Tried to get map with object key");if(r=r[s],r==null)return r}return r};function sl(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var kr=sl,La=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof Da<"u"?Da:typeof self<"u"?self:{};function ol(t,e){return e={exports:{}},t(e,e.exports),e.exports}var ul=typeof La=="object"&&La&&La.Object===Object&&La,ll=ul,fl=typeof self=="object"&&self&&self.Object===Object&&self,hl=ll||fl||Function("return this")(),ln=hl,cl=function(){return ln.Date.now()},ri=cl,vl=/\s/;function dl(t){for(var e=t.length;e--&&vl.test(t.charAt(e)););return e}var gl=dl,pl=/^\s+/;function yl(t){return t&&t.slice(0,gl(t)+1).replace(pl,"")}var ml=yl,bl=ln.Symbol,Qr=bl,rs=Object.prototype,El=rs.hasOwnProperty,wl=rs.toString,Aa=Qr?Qr.toStringTag:void 0;function xl(t){var e=El.call(t,Aa),r=t[Aa];try{t[Aa]=void 0;var a=!0}catch{}var n=wl.call(t);return a&&(e?t[Aa]=r:delete t[Aa]),n}var Tl=xl,Cl=Object.prototype,Dl=Cl.toString;function Sl(t){return Dl.call(t)}var Ll=Sl,Al="[object Null]",Ol="[object Undefined]",as=Qr?Qr.toStringTag:void 0;function Nl(t){return t==null?t===void 0?Ol:Al:as&&as in Object(t)?Tl(t):Ll(t)}var ns=Nl;function Ml(t){return t!=null&&typeof t=="object"}var Il=Ml,Rl="[object Symbol]";function kl(t){return typeof t=="symbol"||Il(t)&&ns(t)==Rl}var Oa=kl,is=0/0,Pl=/^[-+]0x[0-9a-f]+$/i,Bl=/^0b[01]+$/i,Fl=/^0o[0-7]+$/i,zl=parseInt;function Gl(t){if(typeof t=="number")return t;if(Oa(t))return is;if(kr(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=kr(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=ml(t);var r=Bl.test(t);return r||Fl.test(t)?zl(t.slice(2),r?2:8):Pl.test(t)?is:+t}var ss=Gl,Vl="Expected a function",$l=Math.max,_l=Math.min;function Ul(t,e,r){var a,n,i,s,o,l,u=0,f=!1,h=!1,c=!0;if(typeof t!="function")throw new TypeError(Vl);e=ss(e)||0,kr(r)&&(f=!!r.leading,h="maxWait"in r,i=h?$l(ss(r.maxWait)||0,e):i,c="trailing"in r?!!r.trailing:c);function d(A){var x=a,R=n;return a=n=void 0,u=A,s=t.apply(R,x),s}function v(A){return u=A,o=setTimeout(g,e),f?d(A):s}function p(A){var x=A-l,R=A-u,C=e-x;return h?_l(C,i-R):C}function y(A){var x=A-l,R=A-u;return l===void 0||x>=e||x<0||h&&R>=i}function g(){var A=ri();if(y(A))return m(A);o=setTimeout(g,p(A))}function m(A){return o=void 0,c&&a?d(A):(a=n=void 0,s)}function b(){o!==void 0&&clearTimeout(o),u=0,a=l=n=o=void 0}function E(){return o===void 0?s:m(ri())}function N(){var A=ri(),x=y(A);if(a=arguments,n=this,l=A,x){if(o===void 0)return v(l);if(h)return clearTimeout(o),o=setTimeout(g,e),d(l)}return o===void 0&&(o=setTimeout(g,e)),s}return N.cancel=b,N.flush=E,N}var fn=Ul,ai=D?D.performance:null,os=ai&&ai.now?function(){return ai.now()}:function(){return Date.now()},Yl=function(){if(D){if(D.requestAnimationFrame)return function(t){D.requestAnimationFrame(t)};if(D.mozRequestAnimationFrame)return function(t){D.mozRequestAnimationFrame(t)};if(D.webkitRequestAnimationFrame)return function(t){D.webkitRequestAnimationFrame(t)};if(D.msRequestAnimationFrame)return function(t){D.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout(function(){t(os())},1e3/60)}}(),hn=function(e){return Yl(e)},gr=os,Jr=9261,us=65599,Na=5381,ls=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Jr,a=r,n;n=e.next(),!n.done;)a=a*us+n.value|0;return a},Ma=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Jr;return r*us+e|0},Ia=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Na;return(r<<5)+r+e|0},Hl=function(e,r){return e*2097152+r},wr=function(e){return e[0]*2097152+e[1]},cn=function(e,r){return[Ma(e[0],r[0]),Ia(e[1],r[1])]},Xl=function(e,r){var a={value:0,done:!1},n=0,i=e.length,s={next:function(){return n<i?a.value=e[n++]:a.done=!0,a}};return ls(s,r)},Pr=function(e,r){var a={value:0,done:!1},n=0,i=e.length,s={next:function(){return n<i?a.value=e.charCodeAt(n++):a.done=!0,a}};return ls(s,r)},fs=function(){return Wl(arguments)},Wl=function(e){for(var r,a=0;a<e.length;a++){var n=e[a];a===0?r=Pr(n):r=Pr(n,r)}return r},hs=!0,ql=console.warn!=null,Kl=console.trace!=null,ni=Number.MAX_SAFE_INTEGER||9007199254740991,cs=function(){return!0},vn=function(){return!1},vs=function(){return 0},ii=function(){},Tt=function(e){throw new Error(e)},ds=function(e){if(e!==void 0)hs=!!e;else return hs},ut=function(e){ds()&&(ql?console.warn(e):(console.log(e),Kl&&console.trace()))},Zl=function(e){return Ue({},e)},ur=function(e){return e==null?e:te(e)?e.slice():L(e)?Zl(e):e},Ql=function(e){return e.slice()},gs=function(e,r){for(r=e="";e++<36;r+=e*51&52?(e^15?8^Math.random()*(e^20?16:4):4).toString(16):"-");return r},Jl={},ps=function(){return Jl},At=function(e){var r=Object.keys(e);return function(a){for(var n={},i=0;i<r.length;i++){var s=r[i],o=a==null?void 0:a[s];n[s]=o===void 0?e[s]:o}return n}},xr=function(e,r,a){for(var n=e.length-1;n>=0&&!(e[n]===r&&(e.splice(n,1),a));n--);},si=function(e){e.splice(0,e.length)},jl=function(e,r){for(var a=0;a<r.length;a++){var n=r[a];e.push(n)}},tr=function(e,r,a){return a&&(r=wt(a,r)),e[r]},Tr=function(e,r,a,n){a&&(r=wt(a,r)),e[r]=n},ef=function(){function t(){ce(this,t),this._obj={}}return O(t,[{key:"set",value:function(r,a){return this._obj[r]=a,this}},{key:"delete",value:function(r){return this._obj[r]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(r){return this._obj[r]!==void 0}},{key:"get",value:function(r){return this._obj[r]}}]),t}(),lr=typeof Map<"u"?Map:ef,tf="undefined",rf=function(){function t(e){if(ce(this,t),this._obj=Object.create(null),this.size=0,e!=null){var r;e.instanceString!=null&&e.instanceString()===this.instanceString()?r=e.toArray():r=e;for(var a=0;a<r.length;a++)this.add(r[a])}}return O(t,[{key:"instanceString",value:function(){return"set"}},{key:"add",value:function(r){var a=this._obj;a[r]!==1&&(a[r]=1,this.size++)}},{key:"delete",value:function(r){var a=this._obj;a[r]===1&&(a[r]=0,this.size--)}},{key:"clear",value:function(){this._obj=Object.create(null)}},{key:"has",value:function(r){return this._obj[r]===1}},{key:"toArray",value:function(){var r=this;return Object.keys(this._obj).filter(function(a){return r.has(a)})}},{key:"forEach",value:function(r,a){return this.toArray().forEach(r,a)}}]),t}(),jr=(typeof Set>"u"?"undefined":ee(Set))!==tf?Set:rf,dn=function(e,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||r===void 0||!_e(e)){Tt("An element must have a core reference and parameters set");return}var n=r.group;if(n==null&&(r.data&&r.data.source!=null&&r.data.target!=null?n="edges":n="nodes"),n!=="nodes"&&n!=="edges"){Tt("An element must be of type `nodes` or `edges`; you specified `"+n+"`");return}this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:r.data||{},position:r.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:n,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!r.selected,selectable:r.selectable===void 0?!0:!!r.selectable,locked:!!r.locked,grabbed:!1,grabbable:r.grabbable===void 0?!0:!!r.grabbable,pannable:r.pannable===void 0?n==="edges":!!r.pannable,active:!1,classes:new jr,animation:{current:[],queue:[]},rscratch:{},scratch:r.scratch||{},edges:[],children:[],parent:r.parent&&r.parent.isNode()?r.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(i.position.x==null&&(i.position.x=0),i.position.y==null&&(i.position.y=0),r.renderedPosition){var s=r.renderedPosition,o=e.pan(),l=e.zoom();i.position={x:(s.x-o.x)/l,y:(s.y-o.y)/l}}var u=[];te(r.classes)?u=r.classes:j(r.classes)&&(u=r.classes.split(/\s+/));for(var f=0,h=u.length;f<h;f++){var c=u[f];!c||c===""||i.classes.add(c)}this.createEmitter();var d=r.style||r.css;d&&(ut("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."),this.style(d)),(a===void 0||a)&&this.restore()},ys=function(e){return e={bfs:e.bfs||!e.dfs,dfs:e.dfs||!e.bfs},function(a,n,i){var s;L(a)&&!de(a)&&(s=a,a=s.roots||s.root,n=s.visit,i=s.directed),i=arguments.length===2&&!Y(n)?n:i,n=Y(n)?n:function(){};for(var o=this._private.cy,l=a=j(a)?this.filter(a):a,u=[],f=[],h={},c={},d={},v=0,p,y=this.byGroup(),g=y.nodes,m=y.edges,b=0;b<l.length;b++){var E=l[b],N=E.id();E.isNode()&&(u.unshift(E),e.bfs&&(d[N]=!0,f.push(E)),c[N]=0)}for(var A=function(){var X=e.bfs?u.shift():u.pop(),F=X.id();if(e.dfs){if(d[F])return"continue";d[F]=!0,f.push(X)}var re=c[F],q=h[F],Z=q!=null?q.source():null,ie=q!=null?q.target():null,ue=q==null?void 0:X.same(Z)?ie[0]:Z[0],ge=void 0;if(ge=n(X,q,ue,v++,re),ge===!0)return p=X,"break";if(ge===!1)return"break";for(var se=X.connectedEdges().filter(function(me){return(!i||me.source().same(X))&&m.has(me)}),ve=0;ve<se.length;ve++){var ye=se[ve],Te=ye.connectedNodes().filter(function(me){return!me.same(X)&&g.has(me)}),be=Te.id();Te.length!==0&&!d[be]&&(Te=Te[0],u.push(Te),e.bfs&&(d[be]=!0,f.push(Te)),h[be]=ye,c[be]=c[F]+1)}};u.length!==0;){var x=A();if(x!=="continue"&&x==="break")break}for(var R=o.collection(),C=0;C<f.length;C++){var B=f[C],z=h[B.id()];z!=null&&R.push(z),R.push(B)}return{path:o.collection(R),found:o.collection(p)}}},Ra={breadthFirstSearch:ys({bfs:!0}),depthFirstSearch:ys({dfs:!0})};Ra.bfs=Ra.breadthFirstSearch,Ra.dfs=Ra.depthFirstSearch;var af=ol(function(t,e){(function(){var r,a,n,i,s,o,l,u,f,h,c,d,v,p,y;n=Math.floor,h=Math.min,a=function(g,m){return g<m?-1:g>m?1:0},f=function(g,m,b,E,N){var A;if(b==null&&(b=0),N==null&&(N=a),b<0)throw new Error("lo must be non-negative");for(E==null&&(E=g.length);b<E;)A=n((b+E)/2),N(m,g[A])<0?E=A:b=A+1;return[].splice.apply(g,[b,b-b].concat(m)),m},o=function(g,m,b){return b==null&&(b=a),g.push(m),p(g,0,g.length-1,b)},s=function(g,m){var b,E;return m==null&&(m=a),b=g.pop(),g.length?(E=g[0],g[0]=b,y(g,0,m)):E=b,E},u=function(g,m,b){var E;return b==null&&(b=a),E=g[0],g[0]=m,y(g,0,b),E},l=function(g,m,b){var E;return b==null&&(b=a),g.length&&b(g[0],m)<0&&(E=[g[0],m],m=E[0],g[0]=E[1],y(g,0,b)),m},i=function(g,m){var b,E,N,A,x,R;for(m==null&&(m=a),A=(function(){R=[];for(var C=0,B=n(g.length/2);0<=B?C<B:C>B;0<=B?C++:C--)R.push(C);return R}).apply(this).reverse(),x=[],E=0,N=A.length;E<N;E++)b=A[E],x.push(y(g,b,m));return x},v=function(g,m,b){var E;if(b==null&&(b=a),E=g.indexOf(m),E!==-1)return p(g,0,E,b),y(g,E,b)},c=function(g,m,b){var E,N,A,x,R;if(b==null&&(b=a),N=g.slice(0,m),!N.length)return N;for(i(N,b),R=g.slice(m),A=0,x=R.length;A<x;A++)E=R[A],l(N,E,b);return N.sort(b).reverse()},d=function(g,m,b){var E,N,A,x,R,C,B,z,M;if(b==null&&(b=a),m*10<=g.length){if(A=g.slice(0,m).sort(b),!A.length)return A;for(N=A[A.length-1],B=g.slice(m),x=0,C=B.length;x<C;x++)E=B[x],b(E,N)<0&&(f(A,E,0,null,b),A.pop(),N=A[A.length-1]);return A}for(i(g,b),M=[],R=0,z=h(m,g.length);0<=z?R<z:R>z;0<=z?++R:--R)M.push(s(g,b));return M},p=function(g,m,b,E){var N,A,x;for(E==null&&(E=a),N=g[b];b>m;){if(x=b-1>>1,A=g[x],E(N,A)<0){g[b]=A,b=x;continue}break}return g[b]=N},y=function(g,m,b){var E,N,A,x,R;for(b==null&&(b=a),N=g.length,R=m,A=g[m],E=2*m+1;E<N;)x=E+1,x<N&&!(b(g[E],g[x])<0)&&(E=x),g[m]=g[E],m=E,E=2*m+1;return g[m]=A,p(g,R,m,b)},r=function(){g.push=o,g.pop=s,g.replace=u,g.pushpop=l,g.heapify=i,g.updateItem=v,g.nlargest=c,g.nsmallest=d;function g(m){this.cmp=m??a,this.nodes=[]}return g.prototype.push=function(m){return o(this.nodes,m,this.cmp)},g.prototype.pop=function(){return s(this.nodes,this.cmp)},g.prototype.peek=function(){return this.nodes[0]},g.prototype.contains=function(m){return this.nodes.indexOf(m)!==-1},g.prototype.replace=function(m){return u(this.nodes,m,this.cmp)},g.prototype.pushpop=function(m){return l(this.nodes,m,this.cmp)},g.prototype.heapify=function(){return i(this.nodes,this.cmp)},g.prototype.updateItem=function(m){return v(this.nodes,m,this.cmp)},g.prototype.clear=function(){return this.nodes=[]},g.prototype.empty=function(){return this.nodes.length===0},g.prototype.size=function(){return this.nodes.length},g.prototype.clone=function(){var m;return m=new g,m.nodes=this.nodes.slice(0),m},g.prototype.toArray=function(){return this.nodes.slice(0)},g.prototype.insert=g.prototype.push,g.prototype.top=g.prototype.peek,g.prototype.front=g.prototype.peek,g.prototype.has=g.prototype.contains,g.prototype.copy=g.prototype.clone,g}(),function(g,m){return t.exports=m()}(this,function(){return r})}).call(La)}),ka=af,nf=At({root:null,weight:function(e){return 1},directed:!1}),sf={dijkstra:function(e){if(!L(e)){var r=arguments;e={root:r[0],weight:r[1],directed:r[2]}}var a=nf(e),n=a.root,i=a.weight,s=a.directed,o=this,l=i,u=j(n)?this.filter(n)[0]:n[0],f={},h={},c={},d=this.byGroup(),v=d.nodes,p=d.edges;p.unmergeBy(function(re){return re.isLoop()});for(var y=function(q){return f[q.id()]},g=function(q,Z){f[q.id()]=Z,m.updateItem(q)},m=new ka(function(re,q){return y(re)-y(q)}),b=0;b<v.length;b++){var E=v[b];f[E.id()]=E.same(u)?0:1/0,m.push(E)}for(var N=function(q,Z){for(var ie=(s?q.edgesTo(Z):q.edgesWith(Z)).intersect(p),ue=1/0,ge,se=0;se<ie.length;se++){var ve=ie[se],ye=l(ve);(ye<ue||!ge)&&(ue=ye,ge=ve)}return{edge:ge,dist:ue}};m.size()>0;){var A=m.pop(),x=y(A),R=A.id();if(c[R]=x,x!==1/0)for(var C=A.neighborhood().intersect(v),B=0;B<C.length;B++){var z=C[B],M=z.id(),X=N(A,z),F=x+X.dist;F<y(z)&&(g(z,F),h[M]={node:A,edge:X.edge})}}return{distanceTo:function(q){var Z=j(q)?v.filter(q)[0]:q[0];return c[Z.id()]},pathTo:function(q){var Z=j(q)?v.filter(q)[0]:q[0],ie=[],ue=Z,ge=ue.id();if(Z.length>0)for(ie.unshift(Z);h[ge];){var se=h[ge];ie.unshift(se.edge),ie.unshift(se.node),ue=se.node,ge=ue.id()}return o.spawn(ie)}}}},of={kruskal:function(e){e=e||function(b){return 1};for(var r=this.byGroup(),a=r.nodes,n=r.edges,i=a.length,s=new Array(i),o=a,l=function(E){for(var N=0;N<s.length;N++){var A=s[N];if(A.has(E))return N}},u=0;u<i;u++)s[u]=this.spawn(a[u]);for(var f=n.sort(function(b,E){return e(b)-e(E)}),h=0;h<f.length;h++){var c=f[h],d=c.source()[0],v=c.target()[0],p=l(d),y=l(v),g=s[p],m=s[y];p!==y&&(o.merge(c),g.merge(m),s.splice(y,1))}return o}},uf=At({root:null,goal:null,weight:function(e){return 1},heuristic:function(e){return 0},directed:!1}),lf={aStar:function(e){var r=this.cy(),a=uf(e),n=a.root,i=a.goal,s=a.heuristic,o=a.directed,l=a.weight;n=r.collection(n)[0],i=r.collection(i)[0];var u=n.id(),f=i.id(),h={},c={},d={},v=new ka(function(ge,se){return c[ge.id()]-c[se.id()]}),p=new jr,y={},g={},m=function(se,ve){v.push(se),p.add(ve)},b,E,N=function(){b=v.pop(),E=b.id(),p.delete(E)},A=function(se){return p.has(se)};m(n,u),h[u]=0,c[u]=s(n);for(var x=0;v.size()>0;){if(N(),x++,E===f){for(var R=[],C=i,B=f,z=g[B];R.unshift(C),z!=null&&R.unshift(z),C=y[B],C!=null;)B=C.id(),z=g[B];return{found:!0,distance:h[E],path:this.spawn(R),steps:x}}d[E]=!0;for(var M=b._private.edges,X=0;X<M.length;X++){var F=M[X];if(this.hasElementWithId(F.id())&&!(o&&F.data("source")!==E)){var re=F.source(),q=F.target(),Z=re.id()!==E?re:q,ie=Z.id();if(this.hasElementWithId(ie)&&!d[ie]){var ue=h[E]+l(F);if(!A(ie)){h[ie]=ue,c[ie]=ue+s(Z),m(Z,ie),y[ie]=b,g[ie]=F;continue}ue<h[ie]&&(h[ie]=ue,c[ie]=ue+s(Z),y[ie]=b,g[ie]=F)}}}}return{found:!1,distance:void 0,path:void 0,steps:x}}},ff=At({weight:function(e){return 1},directed:!1}),hf={floydWarshall:function(e){for(var r=this.cy(),a=ff(e),n=a.weight,i=a.directed,s=n,o=this.byGroup(),l=o.nodes,u=o.edges,f=l.length,h=f*f,c=function(ye){return l.indexOf(ye)},d=function(ye){return l[ye]},v=new Array(h),p=0;p<h;p++){var y=p%f,g=(p-y)/f;g===y?v[p]=0:v[p]=1/0}for(var m=new Array(h),b=new Array(h),E=0;E<u.length;E++){var N=u[E],A=N.source()[0],x=N.target()[0];if(A!==x){var R=c(A),C=c(x),B=R*f+C,z=s(N);if(v[B]>z&&(v[B]=z,m[B]=C,b[B]=N),!i){var M=C*f+R;!i&&v[M]>z&&(v[M]=z,m[M]=R,b[M]=N)}}}for(var X=0;X<f;X++)for(var F=0;F<f;F++)for(var re=F*f+X,q=0;q<f;q++){var Z=F*f+q,ie=X*f+q;v[re]+v[ie]<v[Z]&&(v[Z]=v[re]+v[ie],m[Z]=m[re])}var ue=function(ye){return(j(ye)?r.filter(ye):ye)[0]},ge=function(ye){return c(ue(ye))},se={distance:function(ye,Te){var be=ge(ye),me=ge(Te);return v[be*f+me]},path:function(ye,Te){var be=ge(ye),me=ge(Te),ae=d(be);if(be===me)return ae.collection();if(m[be*f+me]==null)return r.collection();var xe=r.collection(),Ce=be,Oe;for(xe.merge(ae);be!==me;)Ce=be,be=m[be*f+me],Oe=b[Ce*f+be],xe.merge(Oe),xe.merge(d(be));return xe}};return se}},cf=At({weight:function(e){return 1},directed:!1,root:null}),vf={bellmanFord:function(e){var r=this,a=cf(e),n=a.weight,i=a.directed,s=a.root,o=n,l=this,u=this.cy(),f=this.byGroup(),h=f.edges,c=f.nodes,d=c.length,v=new lr,p=!1,y=[];s=u.collection(s)[0],h.unmergeBy(function(Fe){return Fe.isLoop()});for(var g=h.length,m=function(ke){var ze=v.get(ke.id());return ze||(ze={},v.set(ke.id(),ze)),ze},b=function(ke){return(j(ke)?u.$(ke):ke)[0]},E=function(ke){return m(b(ke)).dist},N=function(ke){for(var ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s,je=b(ke),Ze=[],Ye=je;;){if(Ye==null)return r.spawn();var ct=m(Ye),De=ct.edge,k=ct.pred;if(Ze.unshift(Ye[0]),Ye.same(ze)&&Ze.length>0)break;De!=null&&Ze.unshift(De),Ye=k}return l.spawn(Ze)},A=0;A<d;A++){var x=c[A],R=m(x);x.same(s)?R.dist=0:R.dist=1/0,R.pred=null,R.edge=null}for(var C=!1,B=function(ke,ze,je,Ze,Ye,ct){var De=Ze.dist+ct;De<Ye.dist&&!je.same(Ze.edge)&&(Ye.dist=De,Ye.pred=ke,Ye.edge=je,C=!0)},z=1;z<d;z++){C=!1;for(var M=0;M<g;M++){var X=h[M],F=X.source(),re=X.target(),q=o(X),Z=m(F),ie=m(re);B(F,re,X,Z,ie,q),i||B(re,F,X,ie,Z,q)}if(!C)break}if(C)for(var ue=[],ge=0;ge<g;ge++){var se=h[ge],ve=se.source(),ye=se.target(),Te=o(se),be=m(ve).dist,me=m(ye).dist;if(be+Te<me||!i&&me+Te<be)if(p||(ut("Graph contains a negative weight cycle for Bellman-Ford"),p=!0),e.findNegativeWeightCycles!==!1){var ae=[];be+Te<me&&ae.push(ve),!i&&me+Te<be&&ae.push(ye);for(var xe=ae.length,Ce=0;Ce<xe;Ce++){var Oe=ae[Ce],Me=[Oe];Me.push(m(Oe).edge);for(var He=m(Oe).pred;Me.indexOf(He)===-1;)Me.push(He),Me.push(m(He).edge),He=m(He).pred;Me=Me.slice(Me.indexOf(He));for(var We=Me[0].id(),Re=0,Ie=2;Ie<Me.length;Ie+=2)Me[Ie].id()<We&&(We=Me[Ie].id(),Re=Ie);Me=Me.slice(Re).concat(Me.slice(0,Re)),Me.push(Me[0]);var Ge=Me.map(function(Fe){return Fe.id()}).join(",");ue.indexOf(Ge)===-1&&(y.push(l.spawn(Me)),ue.push(Ge))}}else break}return{distanceTo:E,pathTo:N,hasNegativeWeightCycle:p,negativeWeightCycles:y}}},df=Math.sqrt(2),gf=function(e,r,a){a.length===0&&Tt("Karger-Stein must be run on a connected (sub)graph");for(var n=a[e],i=n[1],s=n[2],o=r[i],l=r[s],u=a,f=u.length-1;f>=0;f--){var h=u[f],c=h[1],d=h[2];(r[c]===o&&r[d]===l||r[c]===l&&r[d]===o)&&u.splice(f,1)}for(var v=0;v<u.length;v++){var p=u[v];p[1]===l?(u[v]=p.slice(),u[v][1]=o):p[2]===l&&(u[v]=p.slice(),u[v][2]=o)}for(var y=0;y<r.length;y++)r[y]===l&&(r[y]=o);return u},oi=function(e,r,a,n){for(;a>n;){var i=Math.floor(Math.random()*r.length);r=gf(i,e,r),a--}return r},pf={kargerStein:function(){var e=this,r=this.byGroup(),a=r.nodes,n=r.edges;n.unmergeBy(function(ie){return ie.isLoop()});var i=a.length,s=n.length,o=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),l=Math.floor(i/df);if(i<2){Tt("At least 2 nodes are required for Karger-Stein algorithm");return}for(var u=[],f=0;f<s;f++){var h=n[f];u.push([f,a.indexOf(h.source()),a.indexOf(h.target())])}for(var c=1/0,d=[],v=new Array(i),p=new Array(i),y=new Array(i),g=function(ue,ge){for(var se=0;se<i;se++)ge[se]=ue[se]},m=0;m<=o;m++){for(var b=0;b<i;b++)p[b]=b;var E=oi(p,u.slice(),i,l),N=E.slice();g(p,y);var A=oi(p,E,l,2),x=oi(y,N,l,2);A.length<=x.length&&A.length<c?(c=A.length,d=A,g(p,v)):x.length<=A.length&&x.length<c&&(c=x.length,d=x,g(y,v))}for(var R=this.spawn(d.map(function(ie){return n[ie[0]]})),C=this.spawn(),B=this.spawn(),z=v[0],M=0;M<v.length;M++){var X=v[M],F=a[M];X===z?C.merge(F):B.merge(F)}var re=function(ue){var ge=e.spawn();return ue.forEach(function(se){ge.merge(se),se.connectedEdges().forEach(function(ve){e.contains(ve)&&!R.contains(ve)&&ge.merge(ve)})}),ge},q=[re(C),re(B)],Z={cut:R,components:q,partition1:C,partition2:B};return Z}},yf=function(e){return{x:e.x,y:e.y}},gn=function(e,r,a){return{x:e.x*r+a.x,y:e.y*r+a.y}},ms=function(e,r,a){return{x:(e.x-a.x)/r,y:(e.y-a.y)/r}},ea=function(e){return{x:e[0],y:e[1]}},mf=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=1/0,i=r;i<a;i++){var s=e[i];isFinite(s)&&(n=Math.min(s,n))}return n},bf=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=-1/0,i=r;i<a;i++){var s=e[i];isFinite(s)&&(n=Math.max(s,n))}return n},Ef=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=0,i=0,s=r;s<a;s++){var o=e[s];isFinite(o)&&(n+=o,i++)}return n/i},wf=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;n?e=e.slice(r,a):(a<e.length&&e.splice(a,e.length-a),r>0&&e.splice(0,r));for(var o=0,l=e.length-1;l>=0;l--){var u=e[l];s?isFinite(u)||(e[l]=-1/0,o++):e.splice(l,1)}i&&e.sort(function(c,d){return c-d});var f=e.length,h=Math.floor(f/2);return f%2!==0?e[h+1+o]:(e[h-1+o]+e[h+o])/2},xf=function(e){return Math.PI*e/180},pn=function(e,r){return Math.atan2(r,e)-Math.PI/2},ui=Math.log2||function(t){return Math.log(t)/Math.log(2)},bs=function(e){return e>0?1:e<0?-1:0},Br=function(e,r){return Math.sqrt(Fr(e,r))},Fr=function(e,r){var a=r.x-e.x,n=r.y-e.y;return a*a+n*n},Tf=function(e){for(var r=e.length,a=0,n=0;n<r;n++)a+=e[n];for(var i=0;i<r;i++)e[i]=e[i]/a;return e},Lt=function(e,r,a,n){return(1-n)*(1-n)*e+2*(1-n)*n*r+n*n*a},ta=function(e,r,a,n){return{x:Lt(e.x,r.x,a.x,n),y:Lt(e.y,r.y,a.y,n)}},Cf=function(e,r,a,n){var i={x:r.x-e.x,y:r.y-e.y},s=Br(e,r),o={x:i.x/s,y:i.y/s};return a=a??0,n=n??a*s,{x:e.x+o.x*n,y:e.y+o.y*n}},Pa=function(e,r,a){return Math.max(e,Math.min(a,r))},Yt=function(e){if(e==null)return{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0};if(e.x1!=null&&e.y1!=null){if(e.x2!=null&&e.y2!=null&&e.x2>=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(e.w!=null&&e.h!=null&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},Df=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},Sf=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},Lf=function(e,r){e.x1=Math.min(e.x1,r.x1),e.x2=Math.max(e.x2,r.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,r.y1),e.y2=Math.max(e.y2,r.y2),e.h=e.y2-e.y1},Af=function(e,r,a){e.x1=Math.min(e.x1,r),e.x2=Math.max(e.x2,r),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,a),e.y2=Math.max(e.y2,a),e.h=e.y2-e.y1},yn=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=r,e.x2+=r,e.y1-=r,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},li=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],a,n,i,s;if(r.length===1)a=n=i=s=r[0];else if(r.length===2)a=i=r[0],s=n=r[1];else if(r.length===4){var o=w(r,4);a=o[0],n=o[1],i=o[2],s=o[3]}return e.x1-=s,e.x2+=n,e.y1-=a,e.y2+=i,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Es=function(e,r){e.x1=r.x1,e.y1=r.y1,e.x2=r.x2,e.y2=r.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},fi=function(e,r){return!(e.x1>r.x2||r.x1>e.x2||e.x2<r.x1||r.x2<e.x1||e.y2<r.y1||r.y2<e.y1||e.y1>r.y2||r.y1>e.y2)},ra=function(e,r,a){return e.x1<=r&&r<=e.x2&&e.y1<=a&&a<=e.y2},Of=function(e,r){return ra(e,r.x,r.y)},ws=function(e,r){return ra(e,r.x1,r.y1)&&ra(e,r.x2,r.y2)},xs=function(e,r,a,n,i,s,o){var l=za(i,s),u=i/2,f=s/2,h;{var c=a-u+l-o,d=n-f-o,v=a+u-l+o,p=d;if(h=Cr(e,r,a,n,c,d,v,p,!1),h.length>0)return h}{var y=a+u+o,g=n-f+l-o,m=y,b=n+f-l+o;if(h=Cr(e,r,a,n,y,g,m,b,!1),h.length>0)return h}{var E=a-u+l-o,N=n+f+o,A=a+u-l+o,x=N;if(h=Cr(e,r,a,n,E,N,A,x,!1),h.length>0)return h}{var R=a-u-o,C=n-f+l-o,B=R,z=n+f-l+o;if(h=Cr(e,r,a,n,R,C,B,z,!1),h.length>0)return h}var M;{var X=a-u+l,F=n-f+l;if(M=Ba(e,r,a,n,X,F,l+o),M.length>0&&M[0]<=X&&M[1]<=F)return[M[0],M[1]]}{var re=a+u-l,q=n-f+l;if(M=Ba(e,r,a,n,re,q,l+o),M.length>0&&M[0]>=re&&M[1]<=q)return[M[0],M[1]]}{var Z=a+u-l,ie=n+f-l;if(M=Ba(e,r,a,n,Z,ie,l+o),M.length>0&&M[0]>=Z&&M[1]>=ie)return[M[0],M[1]]}{var ue=a-u+l,ge=n+f-l;if(M=Ba(e,r,a,n,ue,ge,l+o),M.length>0&&M[0]<=ue&&M[1]>=ge)return[M[0],M[1]]}return[]},Nf=function(e,r,a,n,i,s,o){var l=o,u=Math.min(a,i),f=Math.max(a,i),h=Math.min(n,s),c=Math.max(n,s);return u-l<=e&&e<=f+l&&h-l<=r&&r<=c+l},Mf=function(e,r,a,n,i,s,o,l,u){var f={x1:Math.min(a,o,i)-u,x2:Math.max(a,o,i)+u,y1:Math.min(n,l,s)-u,y2:Math.max(n,l,s)+u};return!(e<f.x1||e>f.x2||r<f.y1||r>f.y2)},If=function(e,r,a,n){a-=n;var i=r*r-4*e*a;if(i<0)return[];var s=Math.sqrt(i),o=2*e,l=(-r+s)/o,u=(-r-s)/o;return[l,u]},Rf=function(e,r,a,n,i){var s=1e-5;e===0&&(e=s),r/=e,a/=e,n/=e;var o,l,u,f,h,c,d,v;if(l=(3*a-r*r)/9,u=-(27*n)+r*(9*a-2*(r*r)),u/=54,o=l*l*l+u*u,i[1]=0,d=r/3,o>0){h=u+Math.sqrt(o),h=h<0?-Math.pow(-h,1/3):Math.pow(h,1/3),c=u-Math.sqrt(o),c=c<0?-Math.pow(-c,1/3):Math.pow(c,1/3),i[0]=-d+h+c,d+=(h+c)/2,i[4]=i[2]=-d,d=Math.sqrt(3)*(-c+h)/2,i[3]=d,i[5]=-d;return}if(i[5]=i[3]=0,o===0){v=u<0?-Math.pow(-u,1/3):Math.pow(u,1/3),i[0]=-d+2*v,i[4]=i[2]=-(v+d);return}l=-l,f=l*l*l,f=Math.acos(u/Math.sqrt(f)),v=2*Math.sqrt(l),i[0]=-d+v*Math.cos(f/3),i[2]=-d+v*Math.cos((f+2*Math.PI)/3),i[4]=-d+v*Math.cos((f+4*Math.PI)/3)},kf=function(e,r,a,n,i,s,o,l){var u=1*a*a-4*a*i+2*a*o+4*i*i-4*i*o+o*o+n*n-4*n*s+2*n*l+4*s*s-4*s*l+l*l,f=1*9*a*i-3*a*a-3*a*o-6*i*i+3*i*o+9*n*s-3*n*n-3*n*l-6*s*s+3*s*l,h=1*3*a*a-6*a*i+a*o-a*e+2*i*i+2*i*e-o*e+3*n*n-6*n*s+n*l-n*r+2*s*s+2*s*r-l*r,c=1*a*i-a*a+a*e-i*e+n*s-n*n+n*r-s*r,d=[];Rf(u,f,h,c,d);for(var v=1e-7,p=[],y=0;y<6;y+=2)Math.abs(d[y+1])<v&&d[y]>=0&&d[y]<=1&&p.push(d[y]);p.push(1),p.push(0);for(var g=-1,m,b,E,N=0;N<p.length;N++)m=Math.pow(1-p[N],2)*a+2*(1-p[N])*p[N]*i+p[N]*p[N]*o,b=Math.pow(1-p[N],2)*n+2*(1-p[N])*p[N]*s+p[N]*p[N]*l,E=Math.pow(m-e,2)+Math.pow(b-r,2),g>=0?E<g&&(g=E):g=E;return g},Pf=function(e,r,a,n,i,s){var o=[e-a,r-n],l=[i-a,s-n],u=l[0]*l[0]+l[1]*l[1],f=o[0]*o[0]+o[1]*o[1],h=o[0]*l[0]+o[1]*l[1],c=h*h/u;return h<0?f:c>u?(e-i)*(e-i)+(r-s)*(r-s):f-c},Ht=function(e,r,a){for(var n,i,s,o,l,u=0,f=0;f<a.length/2;f++)if(n=a[f*2],i=a[f*2+1],f+1<a.length/2?(s=a[(f+1)*2],o=a[(f+1)*2+1]):(s=a[(f+1-a.length/2)*2],o=a[(f+1-a.length/2)*2+1]),!(n==e&&s==e))if(n>=e&&e>=s||n<=e&&e<=s)l=(e-n)/(s-n)*(o-i)+i,l>r&&u++;else continue;return u%2!==0},pr=function(e,r,a,n,i,s,o,l,u){var f=new Array(a.length),h;l[0]!=null?(h=Math.atan(l[1]/l[0]),l[0]<0?h=h+Math.PI/2:h=-h-Math.PI/2):h=l;for(var c=Math.cos(-h),d=Math.sin(-h),v=0;v<f.length/2;v++)f[v*2]=s/2*(a[v*2]*c-a[v*2+1]*d),f[v*2+1]=o/2*(a[v*2+1]*c+a[v*2]*d),f[v*2]+=n,f[v*2+1]+=i;var p;if(u>0){var y=Cs(f,-u);p=Ts(y)}else p=f;return Ht(e,r,p)},Bf=function(e,r,a,n,i,s,o){for(var l=new Array(a.length),u=s/2,f=o/2,h=vi(s,o),c=h*h,d=0;d<a.length/4;d++){var v=void 0,p=void 0;d===0?v=a.length-2:v=d*4-2,p=d*4+2;var y=n+u*a[d*4],g=i+f*a[d*4+1],m=-a[v]*a[p]-a[v+1]*a[p+1],b=h/Math.tan(Math.acos(m)/2),E=y-b*a[v],N=g-b*a[v+1],A=y+b*a[p],x=g+b*a[p+1];l[d*4]=E,l[d*4+1]=N,l[d*4+2]=A,l[d*4+3]=x;var R=a[v+1],C=-a[v],B=R*a[p]+C*a[p+1];B<0&&(R*=-1,C*=-1);var z=E+R*h,M=N+C*h,X=Math.pow(z-e,2)+Math.pow(M-r,2);if(X<=c)return!0}return Ht(e,r,l)},Ts=function(e){for(var r=new Array(e.length/2),a,n,i,s,o,l,u,f,h=0;h<e.length/4;h++){a=e[h*4],n=e[h*4+1],i=e[h*4+2],s=e[h*4+3],h<e.length/4-1?(o=e[(h+1)*4],l=e[(h+1)*4+1],u=e[(h+1)*4+2],f=e[(h+1)*4+3]):(o=e[0],l=e[1],u=e[2],f=e[3]);var c=Cr(a,n,i,s,o,l,u,f,!0);r[h*2]=c[0],r[h*2+1]=c[1]}return r},Cs=function(e,r){for(var a=new Array(e.length*2),n,i,s,o,l=0;l<e.length/2;l++){n=e[l*2],i=e[l*2+1],l<e.length/2-1?(s=e[(l+1)*2],o=e[(l+1)*2+1]):(s=e[0],o=e[1]);var u=o-i,f=-(s-n),h=Math.sqrt(u*u+f*f),c=u/h,d=f/h;a[l*4]=n+c*r,a[l*4+1]=i+d*r,a[l*4+2]=s+c*r,a[l*4+3]=o+d*r}return a},Ff=function(e,r,a,n,i,s){var o=a-e,l=n-r;o/=i,l/=s;var u=Math.sqrt(o*o+l*l),f=u-1;if(f<0)return[];var h=f/u;return[(a-e)*h+e,(n-r)*h+r]},zr=function(e,r,a,n,i,s,o){return e-=i,r-=s,e/=a/2+o,r/=n/2+o,e*e+r*r<=1},Ba=function(e,r,a,n,i,s,o){var l=[a-e,n-r],u=[e-i,r-s],f=l[0]*l[0]+l[1]*l[1],h=2*(u[0]*l[0]+u[1]*l[1]),c=u[0]*u[0]+u[1]*u[1]-o*o,d=h*h-4*f*c;if(d<0)return[];var v=(-h+Math.sqrt(d))/(2*f),p=(-h-Math.sqrt(d))/(2*f),y=Math.min(v,p),g=Math.max(v,p),m=[];if(y>=0&&y<=1&&m.push(y),g>=0&&g<=1&&m.push(g),m.length===0)return[];var b=m[0]*l[0]+e,E=m[0]*l[1]+r;if(m.length>1){if(m[0]==m[1])return[b,E];var N=m[1]*l[0]+e,A=m[1]*l[1]+r;return[b,E,N,A]}else return[b,E]},hi=function(e,r,a){return r<=e&&e<=a||a<=e&&e<=r?e:e<=r&&r<=a||a<=r&&r<=e?r:a},Cr=function(e,r,a,n,i,s,o,l,u){var f=e-i,h=a-e,c=o-i,d=r-s,v=n-r,p=l-s,y=c*d-p*f,g=h*d-v*f,m=p*h-c*v;if(m!==0){var b=y/m,E=g/m,N=.001,A=0-N,x=1+N;return A<=b&&b<=x&&A<=E&&E<=x?[e+b*h,r+b*v]:u?[e+b*h,r+b*v]:[]}else return y===0||g===0?hi(e,a,o)===o?[o,l]:hi(e,a,i)===i?[i,s]:hi(i,o,a)===a?[a,n]:[]:[]},Fa=function(e,r,a,n,i,s,o,l){var u=[],f,h=new Array(a.length),c=!0;s==null&&(c=!1);var d;if(c){for(var v=0;v<h.length/2;v++)h[v*2]=a[v*2]*s+n,h[v*2+1]=a[v*2+1]*o+i;if(l>0){var p=Cs(h,-l);d=Ts(p)}else d=h}else d=a;for(var y,g,m,b,E=0;E<d.length/2;E++)y=d[E*2],g=d[E*2+1],E<d.length/2-1?(m=d[(E+1)*2],b=d[(E+1)*2+1]):(m=d[0],b=d[1]),f=Cr(e,r,n,i,y,g,m,b),f.length!==0&&u.push(f[0],f[1]);return u},zf=function(e,r,a,n,i,s,o,l){for(var u=[],f,h=new Array(a.length),c=s/2,d=o/2,v=vi(s,o),p=0;p<a.length/4;p++){var y=void 0,g=void 0;p===0?y=a.length-2:y=p*4-2,g=p*4+2;var m=n+c*a[p*4],b=i+d*a[p*4+1],E=-a[y]*a[g]-a[y+1]*a[g+1],N=v/Math.tan(Math.acos(E)/2),A=m-N*a[y],x=b-N*a[y+1],R=m+N*a[g],C=b+N*a[g+1];p===0?(h[a.length-2]=A,h[a.length-1]=x):(h[p*4-2]=A,h[p*4-1]=x),h[p*4]=R,h[p*4+1]=C;var B=a[y+1],z=-a[y],M=B*a[g]+z*a[g+1];M<0&&(B*=-1,z*=-1);var X=A+B*v,F=x+z*v;f=Ba(e,r,n,i,X,F,v),f.length!==0&&u.push(f[0],f[1])}for(var re=0;re<h.length/4;re++)f=Cr(e,r,n,i,h[re*4],h[re*4+1],h[re*4+2],h[re*4+3],!1),f.length!==0&&u.push(f[0],f[1]);if(u.length>2){for(var q=[u[0],u[1]],Z=Math.pow(q[0]-e,2)+Math.pow(q[1]-r,2),ie=1;ie<u.length/2;ie++){var ue=Math.pow(u[ie*2]-e,2)+Math.pow(u[ie*2+1]-r,2);ue<=Z&&(q[0]=u[ie*2],q[1]=u[ie*2+1],Z=ue)}return q}return u},mn=function(e,r,a){var n=[e[0]-r[0],e[1]-r[1]],i=Math.sqrt(n[0]*n[0]+n[1]*n[1]),s=(i-a)/i;return s<0&&(s=1e-5),[r[0]+s*n[0],r[1]+s*n[1]]},_t=function(e,r){var a=ci(e,r);return a=Ds(a),a},Ds=function(e){for(var r,a,n=e.length/2,i=1/0,s=1/0,o=-1/0,l=-1/0,u=0;u<n;u++)r=e[2*u],a=e[2*u+1],i=Math.min(i,r),o=Math.max(o,r),s=Math.min(s,a),l=Math.max(l,a);for(var f=2/(o-i),h=2/(l-s),c=0;c<n;c++)r=e[2*c]=e[2*c]*f,a=e[2*c+1]=e[2*c+1]*h,i=Math.min(i,r),o=Math.max(o,r),s=Math.min(s,a),l=Math.max(l,a);if(s<-1)for(var d=0;d<n;d++)a=e[2*d+1]=e[2*d+1]+(-1-s);return e},ci=function(e,r){var a=1/e*2*Math.PI,n=e%2===0?Math.PI/2+a/2:Math.PI/2;n+=r;for(var i=new Array(e*2),s,o=0;o<e;o++)s=o*a+n,i[2*o]=Math.cos(s),i[2*o+1]=Math.sin(-s);return i},za=function(e,r){return Math.min(e/4,r/4,8)},vi=function(e,r){return Math.min(e/10,r/10,8)},Ss=function(){return 8},Gf=function(e,r,a){return[e-2*r+a,2*(r-e),e]},di=function(e,r){return{heightOffset:Math.min(15,.05*r),widthOffset:Math.min(100,.25*e),ctrlPtOffsetPct:.05}},Vf=At({dampingFactor:.8,precision:1e-6,iterations:200,weight:function(e){return 1}}),$f={pageRank:function(e){for(var r=Vf(e),a=r.dampingFactor,n=r.precision,i=r.iterations,s=r.weight,o=this._private.cy,l=this.byGroup(),u=l.nodes,f=l.edges,h=u.length,c=h*h,d=f.length,v=new Array(c),p=new Array(h),y=(1-a)/h,g=0;g<h;g++){for(var m=0;m<h;m++){var b=g*h+m;v[b]=0}p[g]=0}for(var E=0;E<d;E++){var N=f[E],A=N.data("source"),x=N.data("target");if(A!==x){var R=u.indexOfId(A),C=u.indexOfId(x),B=s(N),z=C*h+R;v[z]+=B,p[R]+=B}}for(var M=1/h+y,X=0;X<h;X++)if(p[X]===0)for(var F=0;F<h;F++){var re=F*h+X;v[re]=M}else for(var q=0;q<h;q++){var Z=q*h+X;v[Z]=v[Z]/p[X]+y}for(var ie=new Array(h),ue=new Array(h),ge,se=0;se<h;se++)ie[se]=1;for(var ve=0;ve<i;ve++){for(var ye=0;ye<h;ye++)ue[ye]=0;for(var Te=0;Te<h;Te++)for(var be=0;be<h;be++){var me=Te*h+be;ue[Te]+=v[me]*ie[be]}Tf(ue),ge=ie,ie=ue,ue=ge;for(var ae=0,xe=0;xe<h;xe++){var Ce=ge[xe]-ie[xe];ae+=Ce*Ce}if(ae<n)break}var Oe={rank:function(He){return He=o.collection(He)[0],ie[u.indexOf(He)]}};return Oe}},Ls=At({root:null,weight:function(e){return 1},directed:!1,alpha:0}),aa={degreeCentralityNormalized:function(e){e=Ls(e);var r=this.cy(),a=this.nodes(),n=a.length;if(e.directed){for(var f={},h={},c=0,d=0,v=0;v<n;v++){var p=a[v],y=p.id();e.root=p;var g=this.degreeCentrality(e);c<g.indegree&&(c=g.indegree),d<g.outdegree&&(d=g.outdegree),f[y]=g.indegree,h[y]=g.outdegree}return{indegree:function(b){return c==0?0:(j(b)&&(b=r.filter(b)),f[b.id()]/c)},outdegree:function(b){return d===0?0:(j(b)&&(b=r.filter(b)),h[b.id()]/d)}}}else{for(var i={},s=0,o=0;o<n;o++){var l=a[o];e.root=l;var u=this.degreeCentrality(e);s<u.degree&&(s=u.degree),i[l.id()]=u.degree}return{degree:function(b){return s===0?0:(j(b)&&(b=r.filter(b)),i[b.id()]/s)}}}},degreeCentrality:function(e){e=Ls(e);var r=this.cy(),a=this,n=e,i=n.root,s=n.weight,o=n.directed,l=n.alpha;if(i=r.collection(i)[0],o){for(var d=i.connectedEdges(),v=d.filter(function(A){return A.target().same(i)&&a.has(A)}),p=d.filter(function(A){return A.source().same(i)&&a.has(A)}),y=v.length,g=p.length,m=0,b=0,E=0;E<v.length;E++)m+=s(v[E]);for(var N=0;N<p.length;N++)b+=s(p[N]);return{indegree:Math.pow(y,1-l)*Math.pow(m,l),outdegree:Math.pow(g,1-l)*Math.pow(b,l)}}else{for(var u=i.connectedEdges().intersection(a),f=u.length,h=0,c=0;c<u.length;c++)h+=s(u[c]);return{degree:Math.pow(f,1-l)*Math.pow(h,l)}}}};aa.dc=aa.degreeCentrality,aa.dcn=aa.degreeCentralityNormalised=aa.degreeCentralityNormalized;var As=At({harmonic:!0,weight:function(){return 1},directed:!1,root:null}),na={closenessCentralityNormalized:function(e){for(var r=As(e),a=r.harmonic,n=r.weight,i=r.directed,s=this.cy(),o={},l=0,u=this.nodes(),f=this.floydWarshall({weight:n,directed:i}),h=0;h<u.length;h++){for(var c=0,d=u[h],v=0;v<u.length;v++)if(h!==v){var p=f.distance(d,u[v]);a?c+=1/p:c+=p}a||(c=1/c),l<c&&(l=c),o[d.id()]=c}return{closeness:function(g){return l==0?0:(j(g)?g=s.filter(g)[0].id():g=g.id(),o[g]/l)}}},closenessCentrality:function(e){var r=As(e),a=r.root,n=r.weight,i=r.directed,s=r.harmonic;a=this.filter(a)[0];for(var o=this.dijkstra({root:a,weight:n,directed:i}),l=0,u=this.nodes(),f=0;f<u.length;f++){var h=u[f];if(!h.same(a)){var c=o.distanceTo(h);s?l+=1/c:l+=c}}return s?l:1/l}};na.cc=na.closenessCentrality,na.ccn=na.closenessCentralityNormalised=na.closenessCentralityNormalized;var _f=At({weight:null,directed:!1}),gi={betweennessCentrality:function(e){for(var r=_f(e),a=r.directed,n=r.weight,i=n!=null,s=this.cy(),o=this.nodes(),l={},u={},f=0,h={set:function(b,E){u[b]=E,E>f&&(f=E)},get:function(b){return u[b]}},c=0;c<o.length;c++){var d=o[c],v=d.id();a?l[v]=d.outgoers().nodes():l[v]=d.openNeighborhood().nodes(),h.set(v,0)}for(var p=function(b){for(var E=o[b].id(),N=[],A={},x={},R={},C=new ka(function(be,me){return R[be]-R[me]}),B=0;B<o.length;B++){var z=o[B].id();A[z]=[],x[z]=0,R[z]=1/0}for(x[E]=1,R[E]=0,C.push(E);!C.empty();){var M=C.pop();if(N.push(M),i)for(var X=0;X<l[M].length;X++){var F=l[M][X],re=s.getElementById(M),q=void 0;re.edgesTo(F).length>0?q=re.edgesTo(F)[0]:q=F.edgesTo(re)[0];var Z=n(q);F=F.id(),R[F]>R[M]+Z&&(R[F]=R[M]+Z,C.nodes.indexOf(F)<0?C.push(F):C.updateItem(F),x[F]=0,A[F]=[]),R[F]==R[M]+Z&&(x[F]=x[F]+x[M],A[F].push(M))}else for(var ie=0;ie<l[M].length;ie++){var ue=l[M][ie].id();R[ue]==1/0&&(C.push(ue),R[ue]=R[M]+1),R[ue]==R[M]+1&&(x[ue]=x[ue]+x[M],A[ue].push(M))}}for(var ge={},se=0;se<o.length;se++)ge[o[se].id()]=0;for(;N.length>0;){for(var ve=N.pop(),ye=0;ye<A[ve].length;ye++){var Te=A[ve][ye];ge[Te]=ge[Te]+x[Te]/x[ve]*(1+ge[ve])}ve!=o[b].id()&&h.set(ve,h.get(ve)+ge[ve])}},y=0;y<o.length;y++)p(y);var g={betweenness:function(b){var E=s.collection(b).id();return h.get(E)},betweennessNormalized:function(b){if(f==0)return 0;var E=s.collection(b).id();return h.get(E)/f}};return g.betweennessNormalised=g.betweennessNormalized,g}};gi.bc=gi.betweennessCentrality;var Uf=At({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(t){return 1}]}),Yf=function(e){return Uf(e)},Hf=function(e,r){for(var a=0,n=0;n<r.length;n++)a+=r[n](e);return a},Xf=function(e,r,a){for(var n=0;n<r;n++)e[n*r+n]=a},Os=function(e,r){for(var a,n=0;n<r;n++){a=0;for(var i=0;i<r;i++)a+=e[i*r+n];for(var s=0;s<r;s++)e[s*r+n]=e[s*r+n]/a}},Wf=function(e,r,a){for(var n=new Array(a*a),i=0;i<a;i++){for(var s=0;s<a;s++)n[i*a+s]=0;for(var o=0;o<a;o++)for(var l=0;l<a;l++)n[i*a+l]+=e[i*a+o]*r[o*a+l]}return n},qf=function(e,r,a){for(var n=e.slice(0),i=1;i<a;i++)e=Wf(e,n,r);return e},Kf=function(e,r,a){for(var n=new Array(r*r),i=0;i<r*r;i++)n[i]=Math.pow(e[i],a);return Os(n,r),n},Zf=function(e,r,a,n){for(var i=0;i<a;i++){var s=Math.round(e[i]*Math.pow(10,n))/Math.pow(10,n),o=Math.round(r[i]*Math.pow(10,n))/Math.pow(10,n);if(s!==o)return!1}return!0},Qf=function(e,r,a,n){for(var i=[],s=0;s<r;s++){for(var o=[],l=0;l<r;l++)Math.round(e[s*r+l]*1e3)/1e3>0&&o.push(a[l]);o.length!==0&&i.push(n.collection(o))}return i},Jf=function(e,r){for(var a=0;a<e.length;a++)if(!r[a]||e[a].id()!==r[a].id())return!1;return!0},jf=function(e){for(var r=0;r<e.length;r++)for(var a=0;a<e.length;a++)r!=a&&Jf(e[r],e[a])&&e.splice(a,1);return e},Ns=function(e){for(var r=this.nodes(),a=this.edges(),n=this.cy(),i=Yf(e),s={},o=0;o<r.length;o++)s[r[o].id()]=o;for(var l=r.length,u=l*l,f=new Array(u),h,c=0;c<u;c++)f[c]=0;for(var d=0;d<a.length;d++){var v=a[d],p=s[v.source().id()],y=s[v.target().id()],g=Hf(v,i.attributes);f[p*l+y]+=g,f[y*l+p]+=g}Xf(f,l,i.multFactor),Os(f,l);for(var m=!0,b=0;m&&b<i.maxIterations;)m=!1,h=qf(f,l,i.expandFactor),f=Kf(h,l,i.inflateFactor),Zf(f,h,u,4)||(m=!0),b++;var E=Qf(f,l,r,n);return E=jf(E),E},eh={markovClustering:Ns,mcl:Ns},th=function(e){return e},Ms=function(e,r){return Math.abs(r-e)},Is=function(e,r,a){return e+Ms(r,a)},Rs=function(e,r,a){return e+Math.pow(a-r,2)},rh=function(e){return Math.sqrt(e)},ah=function(e,r,a){return Math.max(e,Ms(r,a))},Ga=function(e,r,a,n,i){for(var s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:th,o=n,l,u,f=0;f<e;f++)l=r(f),u=a(f),o=i(o,l,u);return s(o)},ia={euclidean:function(e,r,a){return e>=2?Ga(e,r,a,0,Rs,rh):Ga(e,r,a,0,Is)},squaredEuclidean:function(e,r,a){return Ga(e,r,a,0,Rs)},manhattan:function(e,r,a){return Ga(e,r,a,0,Is)},max:function(e,r,a){return Ga(e,r,a,-1/0,ah)}};ia["squared-euclidean"]=ia.squaredEuclidean,ia.squaredeuclidean=ia.squaredEuclidean;function bn(t,e,r,a,n,i){var s;return Y(t)?s=t:s=ia[t]||ia.euclidean,e===0&&Y(t)?s(n,i):s(e,r,a,n,i)}var nh=At({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),pi=function(e){return nh(e)},En=function(e,r,a,n,i){var s=i!=="kMedoids",o=s?function(h){return a[h]}:function(h){return n[h](a)},l=function(c){return n[c](r)},u=a,f=r;return bn(e,n.length,o,l,u,f)},yi=function(e,r,a){for(var n=a.length,i=new Array(n),s=new Array(n),o=new Array(r),l=null,u=0;u<n;u++)i[u]=e.min(a[u]).value,s[u]=e.max(a[u]).value;for(var f=0;f<r;f++){l=[];for(var h=0;h<n;h++)l[h]=Math.random()*(s[h]-i[h])+i[h];o[f]=l}return o},ks=function(e,r,a,n,i){for(var s=1/0,o=0,l=0;l<r.length;l++){var u=En(a,e,r[l],n,i);u<s&&(s=u,o=l)}return o},Ps=function(e,r,a){for(var n=[],i=null,s=0;s<r.length;s++)i=r[s],a[i.id()]===e&&n.push(i);return n},ih=function(e,r,a){return Math.abs(r-e)<=a},sh=function(e,r,a){for(var n=0;n<e.length;n++)for(var i=0;i<e[n].length;i++){var s=Math.abs(e[n][i]-r[n][i]);if(s>a)return!1}return!0},oh=function(e,r,a){for(var n=0;n<a;n++)if(e===r[n])return!0;return!1},Bs=function(e,r){var a=new Array(r);if(e.length<50)for(var n=0;n<r;n++){for(var i=e[Math.floor(Math.random()*e.length)];oh(i,a,n);)i=e[Math.floor(Math.random()*e.length)];a[n]=i}else for(var s=0;s<r;s++)a[s]=e[Math.floor(Math.random()*e.length)];return a},Fs=function(e,r,a){for(var n=0,i=0;i<r.length;i++)n+=En("manhattan",r[i],e,a,"kMedoids");return n},uh=function(e){var r=this.cy(),a=this.nodes(),n=null,i=pi(e),s=new Array(i.k),o={},l;i.testMode?typeof i.testCentroids=="number"?(i.testCentroids,l=yi(a,i.k,i.attributes)):ee(i.testCentroids)==="object"?l=i.testCentroids:l=yi(a,i.k,i.attributes):l=yi(a,i.k,i.attributes);for(var u=!0,f=0;u&&f<i.maxIterations;){for(var h=0;h<a.length;h++)n=a[h],o[n.id()]=ks(n,l,i.distance,i.attributes,"kMeans");u=!1;for(var c=0;c<i.k;c++){var d=Ps(c,a,o);if(d.length!==0){for(var v=i.attributes.length,p=l[c],y=new Array(v),g=new Array(v),m=0;m<v;m++){g[m]=0;for(var b=0;b<d.length;b++)n=d[b],g[m]+=i.attributes[m](n);y[m]=g[m]/d.length,ih(y[m],p[m],i.sensitivityThreshold)||(u=!0)}l[c]=y,s[c]=r.collection(d)}}f++}return s},lh=function(e){var r=this.cy(),a=this.nodes(),n=null,i=pi(e),s=new Array(i.k),o,l={},u,f=new Array(i.k);i.testMode?typeof i.testCentroids=="number"||(ee(i.testCentroids)==="object"?o=i.testCentroids:o=Bs(a,i.k)):o=Bs(a,i.k);for(var h=!0,c=0;h&&c<i.maxIterations;){for(var d=0;d<a.length;d++)n=a[d],l[n.id()]=ks(n,o,i.distance,i.attributes,"kMedoids");h=!1;for(var v=0;v<o.length;v++){var p=Ps(v,a,l);if(p.length!==0){f[v]=Fs(o[v],p,i.attributes);for(var y=0;y<p.length;y++)u=Fs(p[y],p,i.attributes),u<f[v]&&(f[v]=u,o[v]=p[y],h=!0);s[v]=r.collection(p)}}c++}return s},fh=function(e,r,a,n,i){for(var s,o,l=0;l<r.length;l++)for(var u=0;u<e.length;u++)n[l][u]=Math.pow(a[l][u],i.m);for(var f=0;f<e.length;f++)for(var h=0;h<i.attributes.length;h++){s=0,o=0;for(var c=0;c<r.length;c++)s+=n[c][f]*i.attributes[h](r[c]),o+=n[c][f];e[f][h]=s/o}},hh=function(e,r,a,n,i){for(var s=0;s<e.length;s++)r[s]=e[s].slice();for(var o,l,u,f=2/(i.m-1),h=0;h<a.length;h++)for(var c=0;c<n.length;c++){o=0;for(var d=0;d<a.length;d++)l=En(i.distance,n[c],a[h],i.attributes,"cmeans"),u=En(i.distance,n[c],a[d],i.attributes,"cmeans"),o+=Math.pow(l/u,f);e[c][h]=1/o}},ch=function(e,r,a,n){for(var i=new Array(a.k),s=0;s<i.length;s++)i[s]=[];for(var o,l,u=0;u<r.length;u++){o=-1/0,l=-1;for(var f=0;f<r[0].length;f++)r[u][f]>o&&(o=r[u][f],l=f);i[l].push(e[u])}for(var h=0;h<i.length;h++)i[h]=n.collection(i[h]);return i},zs=function(e){var r=this.cy(),a=this.nodes(),n=pi(e),i,s,o,l,u;l=new Array(a.length);for(var f=0;f<a.length;f++)l[f]=new Array(n.k);o=new Array(a.length);for(var h=0;h<a.length;h++)o[h]=new Array(n.k);for(var c=0;c<a.length;c++){for(var d=0,v=0;v<n.k;v++)o[c][v]=Math.random(),d+=o[c][v];for(var p=0;p<n.k;p++)o[c][p]=o[c][p]/d}s=new Array(n.k);for(var y=0;y<n.k;y++)s[y]=new Array(n.attributes.length);u=new Array(a.length);for(var g=0;g<a.length;g++)u[g]=new Array(n.k);for(var m=!0,b=0;m&&b<n.maxIterations;)m=!1,fh(s,a,o,u,n),hh(o,l,s,a,n),sh(o,l,n.sensitivityThreshold)||(m=!0),b++;return i=ch(a,o,n,r),{clusters:i,degreeOfMembership:o}},vh={kMeans:uh,kMedoids:lh,fuzzyCMeans:zs,fcm:zs},dh=At({distance:"euclidean",linkage:"min",mode:"threshold",threshold:1/0,addDendrogram:!1,dendrogramDepth:0,attributes:[]}),gh={single:"min",complete:"max"},ph=function(e){var r=dh(e),a=gh[r.linkage];return a!=null&&(r.linkage=a),r},Gs=function(e,r,a,n,i){for(var s=0,o=1/0,l,u=i.attributes,f=function(C,B){return bn(i.distance,u.length,function(z){return u[z](C)},function(z){return u[z](B)},C,B)},h=0;h<e.length;h++){var c=e[h].key,d=a[c][n[c]];d<o&&(s=c,o=d)}if(i.mode==="threshold"&&o>=i.threshold||i.mode==="dendrogram"&&e.length===1)return!1;var v=r[s],p=r[n[s]],y;i.mode==="dendrogram"?y={left:v,right:p,key:v.key}:y={value:v.value.concat(p.value),key:v.key},e[v.index]=y,e.splice(p.index,1),r[v.key]=y;for(var g=0;g<e.length;g++){var m=e[g];v.key===m.key?l=1/0:i.linkage==="min"?(l=a[v.key][m.key],a[v.key][m.key]>a[p.key][m.key]&&(l=a[p.key][m.key])):i.linkage==="max"?(l=a[v.key][m.key],a[v.key][m.key]<a[p.key][m.key]&&(l=a[p.key][m.key])):i.linkage==="mean"?l=(a[v.key][m.key]*v.size+a[p.key][m.key]*p.size)/(v.size+p.size):i.mode==="dendrogram"?l=f(m.value,v.value):l=f(m.value[0],v.value[0]),a[v.key][m.key]=a[m.key][v.key]=l}for(var b=0;b<e.length;b++){var E=e[b].key;if(n[E]===v.key||n[E]===p.key){for(var N=E,A=0;A<e.length;A++){var x=e[A].key;a[E][x]<a[E][N]&&(N=x)}n[E]=N}e[b].index=b}return v.key=p.key=v.index=p.index=null,!0},wn=function t(e,r,a){e&&(e.value?r.push(e.value):(e.left&&t(e.left,r),e.right&&t(e.right,r)))},yh=function t(e,r){if(!e)return"";if(e.left&&e.right){var a=t(e.left,r),n=t(e.right,r),i=r.add({group:"nodes",data:{id:a+","+n}});return r.add({group:"edges",data:{source:a,target:i.id()}}),r.add({group:"edges",data:{source:n,target:i.id()}}),i.id()}else if(e.value)return e.value.id()},mh=function t(e,r,a){if(!e)return[];var n=[],i=[],s=[];return r===0?(e.left&&wn(e.left,n),e.right&&wn(e.right,i),s=n.concat(i),[a.collection(s)]):r===1?e.value?[a.collection(e.value)]:(e.left&&wn(e.left,n),e.right&&wn(e.right,i),[a.collection(n),a.collection(i)]):e.value?[a.collection(e.value)]:(e.left&&(n=t(e.left,r-1,a)),e.right&&(i=t(e.right,r-1,a)),n.concat(i))},Vs=function(e){for(var r=this.cy(),a=this.nodes(),n=ph(e),i=n.attributes,s=function(b,E){return bn(n.distance,i.length,function(N){return i[N](b)},function(N){return i[N](E)},b,E)},o=[],l=[],u=[],f=[],h=0;h<a.length;h++){var c={value:n.mode==="dendrogram"?a[h]:[a[h]],key:h,index:h};o[h]=c,f[h]=c,l[h]=[],u[h]=0}for(var d=0;d<o.length;d++)for(var v=0;v<=d;v++){var p=void 0;n.mode==="dendrogram"?p=d===v?1/0:s(o[d].value,o[v].value):p=d===v?1/0:s(o[d].value[0],o[v].value[0]),l[d][v]=p,l[v][d]=p,p<l[d][u[d]]&&(u[d]=v)}for(var y=Gs(o,f,l,u,n);y;)y=Gs(o,f,l,u,n);var g;return n.mode==="dendrogram"?(g=mh(o[0],n.dendrogramDepth,r),n.addDendrogram&&yh(o[0],r)):(g=new Array(o.length),o.forEach(function(m,b){m.key=m.index=null,g[b]=r.collection(m.value)})),g},bh={hierarchicalClustering:Vs,hca:Vs},Eh=At({distance:"euclidean",preference:"median",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),wh=function(e){var r=e.damping,a=e.preference;.5<=r&&r<1||Tt("Damping must range on [0.5, 1). Got: ".concat(r));var n=["median","mean","min","max"];return n.some(function(i){return i===a})||I(a)||Tt("Preference must be one of [".concat(n.map(function(i){return"'".concat(i,"'")}).join(", "),"] or a number. Got: ").concat(a)),Eh(e)},xh=function(e,r,a,n){var i=function(o,l){return n[l](o)};return-bn(e,n.length,function(s){return i(r,s)},function(s){return i(a,s)},r,a)},Th=function(e,r){var a=null;return r==="median"?a=wf(e):r==="mean"?a=Ef(e):r==="min"?a=mf(e):r==="max"?a=bf(e):a=r,a},Ch=function(e,r,a){for(var n=[],i=0;i<e;i++)r[i*e+i]+a[i*e+i]>0&&n.push(i);return n},$s=function(e,r,a){for(var n=[],i=0;i<e;i++){for(var s=-1,o=-1/0,l=0;l<a.length;l++){var u=a[l];r[i*e+u]>o&&(s=u,o=r[i*e+u])}s>0&&n.push(s)}for(var f=0;f<a.length;f++)n[a[f]]=a[f];return n},Dh=function(e,r,a){for(var n=$s(e,r,a),i=0;i<a.length;i++){for(var s=[],o=0;o<n.length;o++)n[o]===a[i]&&s.push(o);for(var l=-1,u=-1/0,f=0;f<s.length;f++){for(var h=0,c=0;c<s.length;c++)h+=r[s[c]*e+s[f]];h>u&&(l=f,u=h)}a[i]=s[l]}return n=$s(e,r,a),n},_s=function(e){for(var r=this.cy(),a=this.nodes(),n=wh(e),i={},s=0;s<a.length;s++)i[a[s].id()]=s;var o,l,u,f,h,c;o=a.length,l=o*o,u=new Array(l);for(var d=0;d<l;d++)u[d]=-1/0;for(var v=0;v<o;v++)for(var p=0;p<o;p++)v!==p&&(u[v*o+p]=xh(n.distance,a[v],a[p],n.attributes));f=Th(u,n.preference);for(var y=0;y<o;y++)u[y*o+y]=f;h=new Array(l);for(var g=0;g<l;g++)h[g]=0;c=new Array(l);for(var m=0;m<l;m++)c[m]=0;for(var b=new Array(o),E=new Array(o),N=new Array(o),A=0;A<o;A++)b[A]=0,E[A]=0,N[A]=0;for(var x=new Array(o*n.minIterations),R=0;R<x.length;R++)x[R]=0;var C;for(C=0;C<n.maxIterations;C++){for(var B=0;B<o;B++){for(var z=-1/0,M=-1/0,X=-1,F=0,re=0;re<o;re++)b[re]=h[B*o+re],F=c[B*o+re]+u[B*o+re],F>=z?(M=z,z=F,X=re):F>M&&(M=F);for(var q=0;q<o;q++)h[B*o+q]=(1-n.damping)*(u[B*o+q]-z)+n.damping*b[q];h[B*o+X]=(1-n.damping)*(u[B*o+X]-M)+n.damping*b[X]}for(var Z=0;Z<o;Z++){for(var ie=0,ue=0;ue<o;ue++)b[ue]=c[ue*o+Z],E[ue]=Math.max(0,h[ue*o+Z]),ie+=E[ue];ie-=E[Z],E[Z]=h[Z*o+Z],ie+=E[Z];for(var ge=0;ge<o;ge++)c[ge*o+Z]=(1-n.damping)*Math.min(0,ie-E[ge])+n.damping*b[ge];c[Z*o+Z]=(1-n.damping)*(ie-E[Z])+n.damping*b[Z]}for(var se=0,ve=0;ve<o;ve++){var ye=c[ve*o+ve]+h[ve*o+ve]>0?1:0;x[C%n.minIterations*o+ve]=ye,se+=ye}if(se>0&&(C>=n.minIterations-1||C==n.maxIterations-1)){for(var Te=0,be=0;be<o;be++){N[be]=0;for(var me=0;me<n.minIterations;me++)N[be]+=x[me*o+be];(N[be]===0||N[be]===n.minIterations)&&Te++}if(Te===o)break}}for(var ae=Ch(o,h,c),xe=Dh(o,u,ae),Ce={},Oe=0;Oe<ae.length;Oe++)Ce[ae[Oe]]=[];for(var Me=0;Me<a.length;Me++){var He=i[a[Me].id()],We=xe[He];We!=null&&Ce[We].push(a[Me])}for(var Re=new Array(ae.length),Ie=0;Ie<ae.length;Ie++)Re[Ie]=r.collection(Ce[ae[Ie]]);return Re},Sh={affinityPropagation:_s,ap:_s},Lh=At({root:void 0,directed:!1}),Ah={hierholzer:function(e){if(!L(e)){var r=arguments;e={root:r[0],directed:r[1]}}var a=Lh(e),n=a.root,i=a.directed,s=this,o=!1,l,u,f;n&&(f=j(n)?this.filter(n)[0].id():n[0].id());var h={},c={};i?s.forEach(function(m){var b=m.id();if(m.isNode()){var E=m.indegree(!0),N=m.outdegree(!0),A=E-N,x=N-E;A==1?l?o=!0:l=b:x==1?u?o=!0:u=b:(x>1||A>1)&&(o=!0),h[b]=[],m.outgoers().forEach(function(R){R.isEdge()&&h[b].push(R.id())})}else c[b]=[void 0,m.target().id()]}):s.forEach(function(m){var b=m.id();if(m.isNode()){var E=m.degree(!0);E%2&&(l?u?o=!0:u=b:l=b),h[b]=[],m.connectedEdges().forEach(function(N){return h[b].push(N.id())})}else c[b]=[m.source().id(),m.target().id()]});var d={found:!1,trail:void 0};if(o)return d;if(u&&l)if(i){if(f&&u!=f)return d;f=u}else{if(f&&u!=f&&l!=f)return d;f||(f=u)}else f||(f=s[0].id());var v=function(b){for(var E=b,N=[b],A,x,R;h[E].length;)A=h[E].shift(),x=c[A][0],R=c[A][1],E!=R?(h[R]=h[R].filter(function(C){return C!=A}),E=R):!i&&E!=x&&(h[x]=h[x].filter(function(C){return C!=A}),E=x),N.unshift(A),N.unshift(E);return N},p=[],y=[];for(y=v(f);y.length!=1;)h[y[0]].length==0?(p.unshift(s.getElementById(y.shift())),p.unshift(s.getElementById(y.shift()))):y=v(y.shift()).concat(y);p.unshift(s.getElementById(y.shift()));for(var g in h)if(h[g].length)return d;return d.found=!0,d.trail=this.spawn(p,!0),d}},xn=function(){var e=this,r={},a=0,n=0,i=[],s=[],o={},l=function(c,d){for(var v=s.length-1,p=[],y=e.spawn();s[v].x!=c||s[v].y!=d;)p.push(s.pop().edge),v--;p.push(s.pop().edge),p.forEach(function(g){var m=g.connectedNodes().intersection(e);y.merge(g),m.forEach(function(b){var E=b.id(),N=b.connectedEdges().intersection(e);y.merge(b),r[E].cutVertex?y.merge(N.filter(function(A){return A.isLoop()})):y.merge(N)})}),i.push(y)},u=function h(c,d,v){c===v&&(n+=1),r[d]={id:a,low:a++,cutVertex:!1};var p=e.getElementById(d).connectedEdges().intersection(e);if(p.size()===0)i.push(e.spawn(e.getElementById(d)));else{var y,g,m,b;p.forEach(function(E){y=E.source().id(),g=E.target().id(),m=y===d?g:y,m!==v&&(b=E.id(),o[b]||(o[b]=!0,s.push({x:d,y:m,edge:E})),m in r?r[d].low=Math.min(r[d].low,r[m].id):(h(c,m,d),r[d].low=Math.min(r[d].low,r[m].low),r[d].id<=r[m].low&&(r[d].cutVertex=!0,l(d,m))))})}};e.forEach(function(h){if(h.isNode()){var c=h.id();c in r||(n=0,u(c,c),r[c].cutVertex=n>1)}});var f=Object.keys(r).filter(function(h){return r[h].cutVertex}).map(function(h){return e.getElementById(h)});return{cut:e.spawn(f),components:i}},Oh={hopcroftTarjanBiconnected:xn,htbc:xn,htb:xn,hopcroftTarjanBiconnectedComponents:xn},Tn=function(){var e=this,r={},a=0,n=[],i=[],s=e.spawn(e),o=function l(u){i.push(u),r[u]={index:a,low:a++,explored:!1};var f=e.getElementById(u).connectedEdges().intersection(e);if(f.forEach(function(p){var y=p.target().id();y!==u&&(y in r||l(y),r[y].explored||(r[u].low=Math.min(r[u].low,r[y].low)))}),r[u].index===r[u].low){for(var h=e.spawn();;){var c=i.pop();if(h.merge(e.getElementById(c)),r[c].low=r[u].index,r[c].explored=!0,c===u)break}var d=h.edgesWith(h),v=h.merge(d);n.push(v),s=s.difference(v)}};return e.forEach(function(l){if(l.isNode()){var u=l.id();u in r||o(u)}}),{cut:s,components:n}},Nh={tarjanStronglyConnected:Tn,tsc:Tn,tscc:Tn,tarjanStronglyConnectedComponents:Tn},Us={};[Ra,sf,of,lf,hf,vf,pf,$f,aa,na,gi,eh,vh,bh,Sh,Ah,Oh,Nh].forEach(function(t){Ue(Us,t)});/*!
|
|
3
3
|
Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable
|
|
4
4
|
Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{V as H,W as at,B as lt,D as ot,s as ct,g as ht,b as ut,a as yt,E as ft,d as pt,c as et,l as it,X as gt,U as dt,i as mt,Y as _t}from"./index-
|
|
1
|
+
import{V as H,W as at,B as lt,D as ot,s as ct,g as ht,b as ut,a as yt,E as ft,d as pt,c as et,l as it,X as gt,U as dt,i as mt,Y as _t}from"./index-e793d777.js";import{a as tt}from"./arc-632a63ec.js";import{o as vt}from"./ordinal-ba9b4969.js";import{a as kt}from"./array-9f3ba611.js";import{c as F}from"./path-53f90ab3.js";import"./init-77b53fdd.js";function xt(e,u){return u<e?-1:u>e?1:u>=e?0:NaN}function bt(e){return e}function St(){var e=bt,u=xt,$=null,f=F(0),b=F(H),w=F(0);function c(r){var l,g=(r=kt(r)).length,S,A,O=0,m=new Array(g),x=new Array(g),_=+f.apply(this,arguments),h=Math.min(H,Math.max(-H,b.apply(this,arguments)-_)),T,I=Math.min(Math.abs(h)/g,w.apply(this,arguments)),p=I*(h<0?-1:1),t;for(l=0;l<g;++l)(t=x[m[l]=l]=+e(r[l],l,r))>0&&(O+=t);for(u!=null?m.sort(function(i,n){return u(x[i],x[n])}):$!=null&&m.sort(function(i,n){return $(r[i],r[n])}),l=0,A=O?(h-g*p)/O:0;l<g;++l,_=T)S=m[l],t=x[S],T=_+(t>0?t*A:0)+p,x[S]={data:r[S],index:l,value:t,startAngle:_,endAngle:T,padAngle:I};return x}return c.value=function(r){return arguments.length?(e=typeof r=="function"?r:F(+r),c):e},c.sortValues=function(r){return arguments.length?(u=r,$=null,c):u},c.sort=function(r){return arguments.length?($=r,u=null,c):$},c.startAngle=function(r){return arguments.length?(f=typeof r=="function"?r:F(+r),c):f},c.endAngle=function(r){return arguments.length?(b=typeof r=="function"?r:F(+r),c):b},c.padAngle=function(r){return arguments.length?(w=typeof r=="function"?r:F(+r),c):w},c}var J=function(){var e=function(p,t,i,n){for(i=i||{},n=p.length;n--;i[p[n]]=t);return i},u=[1,3],$=[1,4],f=[1,5],b=[1,6],w=[1,10,12,14,16,18,19,20,21,22],c=[2,4],r=[1,5,10,12,14,16,18,19,20,21,22],l=[20,21,22],g=[2,7],S=[1,12],A=[1,13],O=[1,14],m=[1,15],x=[1,16],_=[1,17],h={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,PIE:5,document:6,showData:7,line:8,statement:9,txt:10,value:11,title:12,title_value:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,section:19,NEWLINE:20,";":21,EOF:22,$accept:0,$end:1},terminals_:{2:"error",5:"PIE",7:"showData",10:"txt",11:"value",12:"title",13:"title_value",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"section",20:"NEWLINE",21:";",22:"EOF"},productions_:[0,[3,2],[3,2],[3,3],[6,0],[6,2],[8,2],[9,0],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[4,1],[4,1],[4,1]],performAction:function(t,i,n,a,o,s,V){var v=s.length-1;switch(o){case 3:a.setShowData(!0);break;case 6:this.$=s[v-1];break;case 8:a.addSection(s[v-1],a.cleanupValue(s[v]));break;case 9:this.$=s[v].trim(),a.setDiagramTitle(this.$);break;case 10:this.$=s[v].trim(),a.setAccTitle(this.$);break;case 11:case 12:this.$=s[v].trim(),a.setAccDescription(this.$);break;case 13:a.addSection(s[v].substr(8)),this.$=s[v].substr(8);break}},table:[{3:1,4:2,5:u,20:$,21:f,22:b},{1:[3]},{3:7,4:2,5:u,20:$,21:f,22:b},e(w,c,{6:8,7:[1,9]}),e(r,[2,14]),e(r,[2,15]),e(r,[2,16]),{1:[2,1]},e(l,g,{8:10,9:11,1:[2,2],10:S,12:A,14:O,16:m,18:x,19:_}),e(w,c,{6:18}),e(w,[2,5]),{4:19,20:$,21:f,22:b},{11:[1,20]},{13:[1,21]},{15:[1,22]},{17:[1,23]},e(l,[2,12]),e(l,[2,13]),e(l,g,{8:10,9:11,1:[2,3],10:S,12:A,14:O,16:m,18:x,19:_}),e(w,[2,6]),e(l,[2,8]),e(l,[2,9]),e(l,[2,10]),e(l,[2,11])],defaultActions:{7:[2,1]},parseError:function(t,i){if(i.recoverable)this.trace(t);else{var n=new Error(t);throw n.hash=i,n}},parse:function(t){var i=this,n=[0],a=[],o=[null],s=[],V=this.table,v="",d=0,P=0,z=2,j=1,B=s.slice.call(arguments,1),y=Object.create(this.lexer),N={yy:{}};for(var Y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Y)&&(N.yy[Y]=this.yy[Y]);y.setInput(t,N.yy),N.yy.lexer=y,N.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var X=y.yylloc;s.push(X);var st=y.options&&y.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function rt(){var C;return C=a.pop()||y.lex()||j,typeof C!="number"&&(C instanceof Array&&(a=C,C=a.pop()),C=i.symbols_[C]||C),C}for(var k,L,E,Z,R={},M,D,Q,W;;){if(L=n[n.length-1],this.defaultActions[L]?E=this.defaultActions[L]:((k===null||typeof k>"u")&&(k=rt()),E=V[L]&&V[L][k]),typeof E>"u"||!E.length||!E[0]){var q="";W=[];for(M in V[L])this.terminals_[M]&&M>z&&W.push("'"+this.terminals_[M]+"'");y.showPosition?q="Parse error on line "+(d+1)+`:
|
|
2
2
|
`+y.showPosition()+`
|
|
3
3
|
Expecting `+W.join(", ")+", got '"+(this.terminals_[k]||k)+"'":q="Parse error on line "+(d+1)+": Unexpected "+(k==j?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(q,{text:y.match,token:this.terminals_[k]||k,line:y.yylineno,loc:X,expected:W})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+L+", token: "+k);switch(E[0]){case 1:n.push(k),o.push(y.yytext),s.push(y.yylloc),n.push(E[1]),k=null,P=y.yyleng,v=y.yytext,d=y.yylineno,X=y.yylloc;break;case 2:if(D=this.productions_[E[1]][1],R.$=o[o.length-D],R._$={first_line:s[s.length-(D||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(D||1)].first_column,last_column:s[s.length-1].last_column},st&&(R._$.range=[s[s.length-(D||1)].range[0],s[s.length-1].range[1]]),Z=this.performAction.apply(R,[v,P,d,N.yy,E[1],o,s].concat(B)),typeof Z<"u")return Z;D&&(n=n.slice(0,-1*D*2),o=o.slice(0,-1*D),s=s.slice(0,-1*D)),n.push(this.productions_[E[1]][0]),o.push(R.$),s.push(R._$),Q=V[n[n.length-2]][n[n.length-1]],n.push(Q);break;case 3:return!0}}return!0}},T=function(){var p={EOF:1,parseError:function(i,n){if(this.yy.parser)this.yy.parser.parseError(i,n);else throw new Error(i)},setInput:function(t,i){return this.yy=i||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var i=t.match(/(?:\r\n?|\n).*/g);return i?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var i=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var a=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var o=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===a.length?this.yylloc.first_column:0)+a[a.length-n.length].length-n[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[o[0],o[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
|